aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-03-25 19:06:45 +0100
committerJakub Jelinek <jakub@redhat.com>2020-03-25 19:06:45 +0100
commit6e4cd3cd259af2b5e04986a3f2222528a4f9f762 (patch)
treeafd4ccab92b1baa6322728fc5eecf170fadde9fc /gcc/tree.c
parentb5228b1bc8cb81be494f5b5faa68b6b859ce0227 (diff)
downloadgcc-6e4cd3cd259af2b5e04986a3f2222528a4f9f762.zip
gcc-6e4cd3cd259af2b5e04986a3f2222528a4f9f762.tar.gz
gcc-6e4cd3cd259af2b5e04986a3f2222528a4f9f762.tar.bz2
arm: Fix ICE caused by arm_gen_dicompare_reg [PR94292]
The following testcase ICEs, because arm_gen_dicompare_reg creates invalid RTL which then propagates into DEBUG_INSNs and ICEs while handling them. The problem is that this function emits (insn 18 17 19 2 (set (reg:CC_DNE 100 cc) (compare (ior:SI (ne:SI (subreg:SI (reg:DI 129) 0) (subreg:SI (reg:DI 114 [ _2 ]) 0)) (ne:SI (subreg:SI (reg:DI 129) 4) (subreg:SI (reg:DI 114 [ _2 ]) 4))) (const_int 0 [0]))) "pr94292.c":7:11 325 {*cmp_ior} (nil)) and the invalid thing is that the COMPARE has VOIDmode. Setting a non-VOIDmode SET_DEST to VOIDmode SET_SRC is only valid if the SET_SRC is CONST_INT/CONST_DOUBLE. The following patch fixes it by giving the COMPARE the same mode as it gives to the SET_DEST cc register. 2020-03-25 Jakub Jelinek <jakub@redhat.com> PR target/94292 * config/arm/arm.c (arm_gen_dicompare_reg): Set mode of COMPARE to mode rather than VOIDmode. * gcc.dg/pr94292.c: New test.
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions