Command line: $ rm *.gcda $ gcc -fprofile-generate comp-goto-2.c && ./a.out && gcc -fprofile-use comp-goto-2.c
Compiler output (with valgrind): $ valgrind -q --trace-children=yes /mnt/svn/gcc-trunk/binary-161659-lto-fortran-checking-yes-rtl-df/bin/gcc -fprofile-use testcase.c comp-goto-2.c: In function 'main': comp-goto-2.c:33:5: warning: incompatible implicit declaration of built-in function 'abort' [enabled by default] comp-goto-2.c:35:3: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default] ==8841== Invalid read of size 8 ==8841== at 0x8AB2C0: gimple_block_ends_with_call_p (gimple.h:4660) ==8841== by 0x7D303D: is_edge_inconsistent (profile.c:282) ==8841== by 0x7D3507: compute_branch_probabilities (profile.c:325) ==8841== by 0x7D4CE6: branch_prob (profile.c:1175) ==8841== by 0x9157D5: tree_profiling (tree-profile.c:477) ==8841== by 0x7BA39B: execute_one_pass (passes.c:1565) ==8841== by 0x7BA634: execute_pass_list (passes.c:1620) ==8841== by 0x7B989B: do_per_function_toporder (passes.c:1158) ==8841== by 0x7BAA45: execute_ipa_pass_list (passes.c:1920) ==8841== by 0xAAFCC0: cgraph_optimize (cgraphunit.c:1851) ==8841== by 0xAAFF1A: cgraph_finalize_compilation_unit (cgraphunit.c:1171) ==8841== by 0x4DD812: c_write_global_declarations (c-decl.c:9698) ==8841== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==8841== comp-goto-2.c: In function 'y': comp-goto-2.c:36: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. Testcase is gcc.c-torture/execute/comp-goto-2.c -- Summary: [4.3/4.4/4.5 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end 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=44777