[Bug middle-end/109919] [14 Regression] ICE on valid code at -O2 and -O3 with "-fno-tree-dce -fno-tree-vrp" on x86_64-linux-gnu: in emit_move_insn, at expr.cc:4224
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat May 20 21:06:25 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109919
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simple one line fix:
```
apinski@xeond:~/src/upstream-gcc/gcc/objdir/gcc$ git diff
diff --git a/gcc/expr.cc b/gcc/expr.cc
index 2070198acda..02f24c00148 100644
--- a/gcc/expr.cc
+++ b/gcc/expr.cc
@@ -12956,7 +12956,7 @@ expand_single_bit_test (location_t loc, enum tree_code
code,
intermediate_type = ops_unsigned ? unsigned_type : signed_type;
inner = fold_convert_loc (loc, intermediate_type, inner);
- rtx inner0 = expand_expr (inner, target, VOIDmode, EXPAND_NORMAL);
+ rtx inner0 = expand_expr (inner, NULL_RTX, VOIDmode, EXPAND_NORMAL);
inner0 = extract_bit_field (inner0, 1, bitnum, 1, target,
operand_mode, mode, 0, NULL);
```
To explain what is happening is simple, target in this case is QImode but for
inner we would need a SImode. Anyways the fix is not specify if we should use
target as an hint here.
More information about the Gcc-bugs
mailing list