]> gcc.gnu.org Git - gcc.git/commit
Fix PR 109919: ICE in emit_move_insn with some bit tests
authorAndrew Pinski <apinski@marvell.com>
Sat, 20 May 2023 21:14:23 +0000 (21:14 +0000)
committerAndrew Pinski <apinski@marvell.com>
Sun, 21 May 2023 01:11:24 +0000 (01:11 +0000)
commitee0f1f2294baaecfa0c038fe7e8361949d1ebd68
tree3422ef503570afca019b537a8a0d96b855eb245f
parent7f6e0816f0f5b1e59d05fc96364dec97011f1295
Fix PR 109919: ICE in emit_move_insn with some bit tests

The problem is I used expand_expr with the target but
we don't want to use the target here as it is the wrong
mode for the original expression. The testcase would ICE
deap down while trying to do a move to use the target.
Anyways just calling expand_expr with NULL_EXPR fixes
the issue.

Committed as obvious after a bootstrap/test on x86_64-linux-gnu.

PR middle-end/109919

gcc/ChangeLog:

* expr.cc (expand_single_bit_test): Don't use the
target for expand_expr.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr109919-1.c: New test.
gcc/expr.cc
gcc/testsuite/gcc.c-torture/compile/pr109919-1.c [new file with mode: 0644]
This page took 0.062927 seconds and 6 git commands to generate.