https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61921
Bug ID: 61921 Summary: [4.10 Regression] ICE: SIGSEGV in varpool_node::get_constructor(), at varpool.c:275 with -O2 -fipa-pta Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Created attachment 33189 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33189&action=edit reduced testcase Compiler output (under valgrind): $ gcc -O2 -fipa-pta testcase.C ==11993== Invalid read of size 8 ==11993== at 0xFA105D: varpool_node::get_constructor() (varpool.c:275) ==11993== by 0xE9FFAA: create_variable_info_for_1(tree_node*, char const*) (tree-ssa-structalias.c:5674) ==11993== by 0xEA2D92: intra_create_variable_infos(function*) [clone .isra.123] (tree-ssa-structalias.c:5888) ==11993== by 0xEABF2D: (anonymous namespace)::pass_ipa_pta::execute(function*) (tree-ssa-structalias.c:7190) ==11993== by 0xC190AC: execute_one_pass(opt_pass*) (passes.c:2149) ==11993== by 0xC19CBA: execute_ipa_pass_list(opt_pass*) (passes.c:2539) ==11993== by 0x947386: compile() (cgraphunit.c:2219) ==11993== by 0x9480A4: finalize_compilation_unit() (cgraphunit.c:2338) ==11993== by 0x72441C: cp_write_global_declarations() (decl2.c:4684) ==11993== by 0xD1314C: compile_file() (toplev.c:562) ==11993== by 0xD15484: toplev_main(int, char**) (toplev.c:1938) ==11993== by 0x5A46BF4: (below main) (in /lib64/libc-2.17.so) ==11993== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==11993== testcase.C:21: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: r213075 - ICE r213035 - ICE r212969 - OK 4_9 r212703 - OK