http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47526
Summary: ICE: SIGSEGV in is_empty_class (class.c:6800) with -fabi-version=1 with __typeof of current class member Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Created attachment 23161 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23161 reduced testcase (g++.old-deja/g++.ext/typeof2.C) Crashes at the same place as PR47304, but backtrace is different. Compiler output: $ gcc -fabi-version=1 testcase.C ==13286== Invalid read of size 2 ==13286== at 0x599E20: is_empty_class (class.c:6800) ==13286== by 0x59FD1A: build_base_path (class.c:257) ==13286== by 0x62D10F: finish_non_static_data_member (semantics.c:1595) ==13286== by 0x62D926: finish_qualified_id_expr (semantics.c:1760) ==13286== by 0x640579: finish_id_expression (semantics.c:3161) ==13286== by 0x5D477B: cp_parser_primary_expression (parser.c:4007) ==13286== by 0x5D53DF: cp_parser_postfix_expression (parser.c:5165) ==13286== by 0x5D605A: cp_parser_unary_expression (parser.c:6149) ==13286== by 0x5D6927: cp_parser_binary_expression (parser.c:6819) ==13286== by 0x5D6E42: cp_parser_assignment_expression (parser.c:7038) ==13286== by 0x5D71D9: cp_parser_expression (parser.c:7184) ==13286== by 0x5D48B6: cp_parser_primary_expression (parser.c:3692) ==13286== by 0x5D53DF: cp_parser_postfix_expression (parser.c:5165) ==13286== by 0x5D605A: cp_parser_unary_expression (parser.c:6149) ==13286== by 0x5DF1AE: cp_parser_sizeof_operand (parser.c:20644) ==13286== by 0x5D36D4: cp_parser_simple_type_specifier (parser.c:12767) ==13286== by 0x5CBEE3: cp_parser_type_specifier (parser.c:12624) ==13286== by 0x5CDD07: cp_parser_decl_specifier_seq (parser.c:9981) ==13286== by 0x5E72ED: cp_parser_member_declaration (parser.c:17737) ==13286== by 0x5CC4E3: cp_parser_type_specifier (parser.c:17621) ==13286== by 0x5CDD07: cp_parser_decl_specifier_seq (parser.c:9981) ==13286== by 0x5E5029: cp_parser_simple_declaration (parser.c:9632) ==13286== by 0x5E54B8: cp_parser_block_declaration (parser.c:9583) ==13286== by 0x5E9201: cp_parser_declaration (parser.c:9488) ==13286== by 0x5E7D29: cp_parser_declaration_seq_opt (parser.c:9374) ==13286== by 0x5E9878: c_parse_file (parser.c:3463) ==13286== by 0x6BF714: c_common_parse_file (c-opts.c:1077) ==13286== by 0xA27A27: toplev_main (toplev.c:579) ==13286== by 0x62FEBBC: (below main) (in /lib64/libc-2.11.2.so) ==13286== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==13286== testcase.C:4:16: 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: r169355 - crash 4.5.2, 4.4.5 - crash 4.3.5 - code is rejected