http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50682
Bug #: 50682
Summary: [4.7 Regression] ICE: SIGSEGV in main_block_label with
-O2 -fnon-call-exceptions -ftracer
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 25450
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25450
reduced testcase
Compiler output:
$ gcc -O2 -fnon-call-exceptions -ftracer -fno-tree-ccp -fno-tree-copy-prop
-fno-tree-dce testcase.C
==3654== Invalid read of size 4
==3654== at 0xB65233: main_block_label(tree_node*) (tree-cfg.c:1082)
==3654== by 0xB6965E: cleanup_dead_labels() (tree-cfg.c:1111)
==3654== by 0xBBA2EC: execute_cleanup_cfg_post_optimizing()
(tree-optimize.c:162)
==3654== by 0xA62BF7: execute_one_pass(opt_pass*) (passes.c:2064)
==3654== by 0xA62F64: execute_pass_list(opt_pass*) (passes.c:2119)
==3654== by 0xBBACFD: tree_rest_of_compilation(tree_node*)
(tree-optimize.c:420)
==3654== by 0x815EE5: cgraph_expand_function(cgraph_node*)
(cgraphunit.c:1805)
==3654== by 0x817E2B: cgraph_optimize() (cgraphunit.c:1864)
==3654== by 0x818219: cgraph_finalize_compilation_unit() (cgraphunit.c:1312)
==3654== by 0x64266A: cp_write_global_declarations() (decl2.c:4008)
==3654== by 0xB58803: toplev_main(int, char**) (toplev.c:581)
==3654== by 0x674ED2C: (below main) (in /lib64/libc-2.12.2.so)
==3654== Address 0x50 is not stack'd, malloc'd or (recently) free'd
==3654==
testcase.C: In function 'void test01()':
testcase.C:29:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Tested revisions:
r179711 - crash
r178498 - crash
4.6 r177922 - OK