http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46130
--- Comment #6 from Zdenek Sojka <zsojka at seznam dot cz> 2010-11-16 00:52:52 UTC --- Created attachment 22414 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22414 another simple testcase This one needs -flto too: $ gcc -O2 -flto -fno-tree-dce testcase.c ==9353== Invalid read of size 2 ==9353== at 0x710735: walk_stmt_load_store_addr_ops (gimple.c:5024) ==9353== by 0xAC5C12: rebuild_cgraph_edges (cgraphbuild.c:474) ==9353== by 0x7BCA0E: execute_one_pass (passes.c:1560) ==9353== by 0x7BCCD4: execute_pass_list (passes.c:1615) ==9353== by 0x7BBEFB: do_per_function_toporder (passes.c:1153) ==9353== by 0x7BD185: execute_ipa_pass_list (passes.c:1932) ==9353== by 0xACAD67: cgraph_optimize (cgraphunit.c:1694) ==9353== by 0xACAF29: cgraph_finalize_compilation_unit (cgraphunit.c:1015) ==9353== by 0x4D7D8B: c_write_global_declarations (c-decl.c:9837) ==9353== by 0x8A9405: toplev_main (toplev.c:885) ==9353== by 0x6376BBC: (below main) (in /lib64/libc-2.11.2.so) ==9353== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==9353== testcase.c: In function 'foo': testcase.c:4: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.