[Bug c++/88613] [9 Regression] ICE in size_binop_loc at fold-const.c:1900 since r267272
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 28 11:54:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88613
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems it is fold_cache related, we are cp_folding (int) VIEW_CONVERT_EXPR
<const int, 5> != 5 and for the VIEW_CONVERT_EXPR <const int, 5> for some
reason find an entry in fold_cache that it is equivalent to a VAR_DECL x and
thus undo the folding. I think the VCE is a location wrapper, and when being
entered into the fold cache, org_x has been
<view_convert_expr 0x7fffea959440
type <integer_type 0x7fffea94b930 int readonly type_6 SI
size <integer_cst 0x7fffea817060 constant 32>
unit-size <integer_cst 0x7fffea817078 constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffea94b930 precision:32 min <integer_cst 0x7fffea817018 -2147483648> max
<integer_cst 0x7fffea817030 2147483647>>
public
arg:0 <var_decl 0x7ffff7ffbcf0 x type <integer_type 0x7fffea94b930 int>
used SI pr88613.C:5:13 size <integer_cst 0x7fffea817060 32> unit-size
<integer_cst 0x7fffea817078 4>
align:32 warn_if_not_align:0 context <function_decl 0x7fffea950400
operator()>
value-expr <component_ref 0x7fffea95f2d0 type <integer_type
0x7fffea94b930 int>
readonly
arg:0 <indirect_ref 0x7fffea959400 type <record_type 0x7fffea94bc78
__lambda0>
arg:0 <parm_decl 0x7fffea81f200 __closure>> arg:1 <field_decl
0x7fffea917850 __x>
pr88613.C:5:13 start: pr88613.C:5:13 finish: pr88613.C:5:13>>
pr88613.C:5:13 start: pr88613.C:5:13 finish: pr88613.C:5:13>
and x the VAR_DECL the location wrapper has as the argument.
But later on mark_use modifies the VCE in place and nothing invalidates the
fold cache.
More information about the Gcc-bugs
mailing list