http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46130
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-10-22 13:48:55 UTC --- Created attachment 22118 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22118 another testcase This testcase is shorter and doesn't take address of an function, but it needs -flto $ gcc -O2 -flto -fno-tree-dce pr46130-2.c ==30450== Invalid read of size 2 ==30450== at 0x6EA541: walk_stmt_load_store_addr_ops (gimple.c:4894) ==30450== by 0xAAB87A: rebuild_cgraph_edges (cgraphbuild.c:471) ==30450== by 0x796C5E: execute_one_pass (passes.c:1560) ==30450== by 0x796EF4: execute_pass_list (passes.c:1615) ==30450== by 0x79616B: do_per_function_toporder (passes.c:1153) ==30450== by 0x7973A5: execute_ipa_pass_list (passes.c:1932) ==30450== by 0xAB09D7: cgraph_optimize (cgraphunit.c:1696) ==30450== by 0xAB0B99: cgraph_finalize_compilation_unit (cgraphunit.c:1016) ==30450== by 0x4ABB8B: c_write_global_declarations (c-decl.c:9828) ==30450== by 0x88A553: toplev_main (toplev.c:931) ==30450== by 0x658ABBC: (below main) (in /lib64/libc-2.11.2.so) ==30450== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==30450== pr46130-2.c: In function 'foo': pr46130-2.c:8: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.