http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47291
Summary: [4.6 Regression] ICE: SIGSEGV in size_binop_loc (fold-const.c:1427) with -g Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 22965 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22965 reduced testcase (from g++.old-deja/g++.pt/ptrmem2.C) Compiler output: $ gcc -g testcase.C ==15482== Invalid read of size 8 ==15482== at 0x863310: size_binop_loc (fold-const.c:1427) ==15482== by 0xA12739: byte_from_pos (stor-layout.c:840) ==15482== by 0x53C217: cplus_expand_constant (expr.c:50) ==15482== by 0x4FAC3E: fold_cplus_constants (cp-lang.c:218) ==15482== by 0x7AB5CE: gen_generic_params_dies (dwarf2out.c:13048) ==15482== by 0x7B51A3: gen_tagged_type_die (dwarf2out.c:20150) ==15482== by 0x7A8FB0: gen_type_die_with_usage (dwarf2out.c:20500) ==15482== by 0x7B3EAD: gen_decl_die (dwarf2out.c:21057) ==15482== by 0x9357BB: rest_of_type_compilation (passes.c:229) ==15482== by 0x5A6479: finish_struct_1 (class.c:5683) ==15482== by 0x582A6A: instantiate_class_template (pt.c:8561) ==15482== by 0x5F0486: complete_type (typeck.c:134) ==15482== by 0x5344F4: grokdeclarator (decl.c:9651) ==15482== by 0x5ACFC2: grokfield (decl2.c:806) ==15482== by 0x5E7B51: cp_parser_member_declaration (parser.c:18010) ==15482== by 0x5CCA6B: cp_parser_type_specifier (parser.c:17630) ==15482== by 0x5CE247: cp_parser_decl_specifier_seq (parser.c:9990) ==15482== by 0x5E55B9: cp_parser_simple_declaration (parser.c:9641) ==15482== by 0x5E5A48: cp_parser_block_declaration (parser.c:9592) ==15482== by 0x5E9771: cp_parser_declaration (parser.c:9497) ==15482== by 0x5E8299: cp_parser_declaration_seq_opt (parser.c:9383) ==15482== by 0x5E9DE8: c_parse_file (parser.c:3463) ==15482== by 0x6BE0E4: c_common_parse_file (c-opts.c:1071) ==15482== by 0xA211D5: toplev_main (toplev.c:579) ==15482== by 0x62FEBBC: (below main) (in /lib64/libc-2.11.2.so) ==15482== Address 0x10 is not stack'd, malloc'd or (recently) free'd ==15482== testcase.C: In instantiation of 'D<&S::i>': testcase.C:7:15: instantiated from here testcase.C:2:30: 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: r168743 - crash 4.5.2 - OK