http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47304

           Summary: ICE: SIGSEGV in is_empty_class (class.c:6800) with
                    -fabi-version=1
           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 22973
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22973
reduced testcase (from g++.dg/expr/cast7.C)

Compiler output:
$ gcc -fabi-version=1 testcase.C
==9722== Invalid read of size 2
==9722==    at 0x59A3D0: is_empty_class (class.c:6800)
==9722==    by 0x5A02BA: build_base_path (class.c:257)
==9722==    by 0x50AA94: convert_like_real (call.c:5601)
==9722==    by 0x50E88A: perform_direct_initialization_if_possible
(call.c:8063)
==9722==    by 0x6039FF: build_static_cast_1 (typeck.c:5775)
==9722==    by 0x602C69: cp_build_c_cast (typeck.c:6385)
==9722==    by 0x5D6F57: cp_parser_binary_expression (parser.c:6819)
==9722==    by 0x5D7472: cp_parser_assignment_expression (parser.c:7038)
==9722==    by 0x5D7809: cp_parser_expression (parser.c:7184)
==9722==    by 0x5D4EE6: cp_parser_primary_expression (parser.c:3692)
==9722==    by 0x5D5A0F: cp_parser_postfix_expression (parser.c:5165)
==9722==    by 0x5D668A: cp_parser_unary_expression (parser.c:6149)
==9722==    by 0x5DF79E: cp_parser_sizeof_operand (parser.c:20653)
==9722==    by 0x5D690F: cp_parser_unary_expression (parser.c:5940)
==9722==    by 0x5D6F57: cp_parser_binary_expression (parser.c:6819)
==9722==    by 0x5D7472: cp_parser_assignment_expression (parser.c:7038)
==9722==    by 0x5D7E71: cp_parser_constant_expression (parser.c:7263)
==9722==    by 0x5E805C: cp_parser_member_declaration (parser.c:18151)
==9722==    by 0x5CCAAB: cp_parser_type_specifier (parser.c:17630)
==9722==    by 0x5CE287: cp_parser_decl_specifier_seq (parser.c:9990)
==9722==    by 0x5E55F9: cp_parser_simple_declaration (parser.c:9641)
==9722==    by 0x5E5A88: cp_parser_block_declaration (parser.c:9592)
==9722==    by 0x5E97B1: cp_parser_declaration (parser.c:9497)
==9722==    by 0x5E82D9: cp_parser_declaration_seq_opt (parser.c:9383)
==9722==    by 0x5E9E28: c_parse_file (parser.c:3463)
==9722==    by 0x6BE144: c_common_parse_file (c-opts.c:1071)
==9722==    by 0xA21475: toplev_main (toplev.c:579)
==9722==    by 0x62FEBBC: (below main) (in /lib64/libc-2.11.2.so)
==9722==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9722== 
testcase.C:6:44: 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:
r168785 - crash
4.5 r168785 - crash
4.4 r168785 - crash

Reply via email to