[Bug c++/84938] [7/8 Regression] internal compiler error: in gen_reg_rtx, at emit-rtl.c:1187 (gen_reg_rtx()/maybe_legitimize_operand())
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 19 12:23:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84938
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
int &&a = 1 / ~-1;
is enough.
When we have
int &&b = 1 / 0;
this doesn't ICE. When creating TRUNC_DIV_EXPR for the latter, we don't set
the constant bit on it, because the last argument is integer_zerop. That is
not the case with the former testcase, but both arguments are TREE_CONSTANT and
so we set TREE_CONSTANT on the TRUNC_DIV_EXPR as well.
I'm surprised we never cp_fold this initializer.
More information about the Gcc-bugs
mailing list