Command line: gcc -O1 -c testcase.c Tested revisions: trunk r157161 x86_64 - segfault trunk r156472 i686 - segfault trunk r153685 x86_64 - segfault 4.4 r157120 x86_64 - assert at tree-nrv.c:143 4.4 r156591 i686 - OK 4.4 r149995 x86_64 - assert at tree-nrv.c:143 (all with checking=yes)
Output - trunk: $ valgrind --trace-children=yes /mnt/svn/gcc-trunk/binary-157161/bin/gcc -O1 -c testcase.c ... ==22758== ==22758== Invalid read of size 2 ==22758== at 0x6E51B6: mark_jump_label_1 (jump.c:1027) ==22758== by 0x6E531F: mark_jump_label_1 (jump.c:1141) ==22758== by 0x6E531F: mark_jump_label_1 (jump.c:1141) ==22758== by 0x6E531F: mark_jump_label_1 (jump.c:1141) ==22758== by 0x6E563E: rebuild_jump_labels (jump.c:199) ==22758== by 0x5711EC: gimple_expand_cfg (cfgexpand.c:3773) ==22758== by 0x72531A: execute_one_pass (passes.c:1567) ==22758== by 0x7255A4: execute_pass_list (passes.c:1622) ==22758== by 0x81B594: tree_rest_of_compilation (tree-optimize.c:413) ==22758== by 0x99DBB0: cgraph_expand_function (cgraphunit.c:1545) ==22758== by 0x9A0584: cgraph_optimize (cgraphunit.c:1624) ==22758== by 0x9A0AE4: cgraph_finalize_compilation_unit (cgraphunit.c:1093) ==22758== Address 0xffffffff00000020 is not stack'd, malloc'd or (recently) free'd ==22758== testcase.c: In function 'foo': testcase.c:15: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. Output - 4.4 x86_64: $ /mnt/svn/gcc-4_4/binary-157120-enable-checking/bin/gcc -O1 -c testcase.c testcase.c: In function ‘bar’: testcase.c:5: internal compiler error: in tree_nrv, at tree-nrv.c:143 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE with per-function -ftree-loop-distribution (via attribute optimize or pragma) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86(_64)-pc-linux-gnu GCC target triplet: x86(_64)-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43234