https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87874
Bug ID: 87874
Summary: [8/9 Regression] ICE in simplify_subreg, at
simplify-rtx.c:6396
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: x86_64-unknown-linux-gnu
gcc-9.0.0-alpha20181028 snapshot (r265575) ICEs when compiling the following
snippet w/ -g -O1 -fgcse -fno-dce -fno-tree-ccp -fno-tree-coalesce-vars
-fno-tree-copy-prop -fno-tree-dce -fno-tree-dominator-opts -fno-tree-fre
-fno-tree-loop-optimize -fno-tree-sink:
int *vk;
int m2;
__int128 nb;
void
em (int u5, int fo, int s7)
{
for (;;)
{
long int es;
es = !!u5 ? (!!fo && !!m2) : fo;
if (es == 0)
if (nb == *vk)
{
const unsigned long int uint64_max = 18446744073709551615ul;
__int128 ks = uint64_max / 2 + 1;
while (s7 < 1)
while (nb < 2)
{
for (ks = 0; ks < 3; ++ks)
{
}
++nb;
}
}
}
}
% x86_64-unknown-linux-gnu-gcc-9.0.0-alpha20181028 -g -O1 -fgcse -fno-dce
-fno-tree-ccp -fno-tree-coalesce-vars -fno-tree-copy-prop -fno-tree-dce
-fno-tree-dominator-opts -fno-tree-fre -fno-tree-loop-optimize -fno-tree-sink
-c gq9xsx28.c
during RTL pass: vartrack
gq9xsx28.c: In function 'em':
gq9xsx28.c:30:1: internal compiler error: in simplify_subreg, at
simplify-rtx.c:6396
30 | }
| ^
0x65c30c simplify_subreg(machine_mode, rtx_def*, machine_mode, poly_int<1u,
unsigned long>)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/simplify-rtx.c:6396
0xcb36d8 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, poly_int<1u,
unsigned long>)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/simplify-rtx.c:6667
0xf911d6 vt_expand_loc_callback
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:8488
0x8f132c cselib_expand_value_rtx_1
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/cselib.c:1681
0x8f373e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/cselib.c:1562
0xf9162e vt_expand_var_loc_chain
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:8384
0xf9162e vt_expand_loc_callback
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:8547
0x8f13d6 cselib_expand_value_rtx_1
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/cselib.c:1716
0x8f373e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/cselib.c:1562
0xf9076c vt_expand_var_loc_chain
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:8384
0xf9076c vt_expand_1pvar
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:8660
0xf9076c emit_note_insn_var_location(variable**, emit_note_data*)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:8714
0xf92973 void hash_table<variable_hasher,
xcallocator>::traverse_noresize<emit_note_data*,
&(emit_note_insn_var_location(variable**, emit_note_data*))>(emit_note_data*)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/hash-table.h:973
0xf92973 void hash_table<variable_hasher,
xcallocator>::traverse<emit_note_data*,
&(emit_note_insn_var_location(variable**, emit_note_data*))>(emit_note_data*)
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/hash-table.h:994
0xf92973 emit_notes_for_changes
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:9074
0xf9d67c emit_notes_in_bb
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:9508
0xf9d67c vt_emit_notes
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:9567
0xf9dcc4 variable_tracking_main_1
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:10499
0xf9dcc4 variable_tracking_main()
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:10513
0xf9dcc4 execute
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181028/work/gcc-9-20181028/gcc/var-tracking.c:10550