https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61833
Bug ID: 61833
Summary: [4.9] ICE in fold_comparison
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppluzhnikov at google dot com
Created attachment 33134
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33134&action=edit
test case
Google ref: b/16030670
Originally reported against gcc-4.8.
Attached test case causes gcc-4_9-branch (r212536) to ICE like this (but only
with -O2):
gcc-svn-4_9-r212536/bin/g++ -c -std=c++11 t.ii -O2
t.ii: In function ‘void ToSpec()’:
t.ii:158:1: internal compiler error: Segmentation fault
ToSpec ()
^
0xb947ff crash_signal
../../gcc/toplev.c:337
0x952096 fold_comparison
../../gcc/fold-const.c:9074
0x95b8a7 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
../../gcc/fold-const.c:12953
0xbca30d cleanup_control_expr_graph
../../gcc/tree-cfgcleanup.c:112
0xbca30d cleanup_control_flow_bb
../../gcc/tree-cfgcleanup.c:187
0xbca30d cleanup_tree_cfg_bb
../../gcc/tree-cfgcleanup.c:630
0xbcbd48 cleanup_tree_cfg_1
../../gcc/tree-cfgcleanup.c:675
0xbcbd48 cleanup_tree_cfg_noloop
../../gcc/tree-cfgcleanup.c:731
0xbcbd48 cleanup_tree_cfg()
../../gcc/tree-cfgcleanup.c:786
0xaea194 execute_function_todo
../../gcc/passes.c:1811
0xaeaa83 execute_todo
../../gcc/passes.c:1887
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
Trunk rejects the reduced test case with "definition of std::initializer_list
does not match #include <initializer_list>" due to fixes for PR61723.
Trunk @r212277 does not ICE.