diff options
author | Roger Sayle <sayle@gcc.gnu.org> | 2006-03-13 23:47:47 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-03-13 23:47:47 +0000 |
commit | f831807967c55f828ba7dfb304f12f086d943417 (patch) | |
tree | c4689c459a59af36095a53e46897d7983e27ada0 /gcc/stmt.c | |
parent | 26a851b930f908e3dffa57a3dfa2597c6ed004d7 (diff) | |
download | gcc-f831807967c55f828ba7dfb304f12f086d943417.zip gcc-f831807967c55f828ba7dfb304f12f086d943417.tar.gz gcc-f831807967c55f828ba7dfb304f12f086d943417.tar.bz2 |
re PR middle-end/26557 (ICE in simplify_subreg)
PR middle-end/26557
* stmt.c (emit_case_nodes): Handle the case where the index is a
CONST_INT, where the comparison mode is specified by the index type.
* gcc.c-torture/compile/switch-1.c: New test case.
From-SVN: r112032
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2944,6 +2944,10 @@ emit_case_nodes (rtx index, case_node_ptr node, rtx default_label, enum machine_mode mode = GET_MODE (index); enum machine_mode imode = TYPE_MODE (index_type); + /* Handle indices detected as constant during RTL expansion. */ + if (mode == VOIDmode) + mode = imode; + /* See if our parents have already tested everything for us. If they have, emit an unconditional jump for this node. */ if (node_is_bounded (node, index_type)) |