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

           Summary: [C++0x] ICE: SIGSEGV in compute_array_index_type
                    (cp/decl.c:7522)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz


Created attachment 23529
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23529
reduced testcase

$ gcc -std=c++0x testcase.C
testcase.C:8:9: 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.

Doesn't crash when operator int is uncommented.

(gdb) bt
#0  compute_array_index_type (name=0x7ffff5ba0058, size=0x0, complain=3) at
/mnt/svn/gcc-trunk/gcc/cp/decl.c:7522
#1  0x0000000000539100 in create_array_type_for_decl (declarator=0x1942220,
declspecs=0x7fffffffd880, decl_context=NORMAL, initialized=0, 
    attrlist=0x7fffffffd768) at /mnt/svn/gcc-trunk/gcc/cp/decl.c:7784
#2  grokdeclarator (declarator=0x1942220, declspecs=0x7fffffffd880,
decl_context=NORMAL, initialized=0, attrlist=0x7fffffffd768)
    at /mnt/svn/gcc-trunk/gcc/cp/decl.c:8671
#3  0x000000000053efd8 in start_decl (declarator=0x1942220,
declspecs=0x7fffffffd880, initialized=0, attributes=0x0, prefix_attributes=0x0, 
    pushed_scope_p=0x7fffffffd810) at /mnt/svn/gcc-trunk/gcc/cp/decl.c:4211
#4  0x00000000005e45f0 in cp_parser_init_declarator (parser=0x7ffff5ba00b0,
decl_specifiers=0x7fffffffd880, checks=0x0, 
    function_definition_allowed_p=0 '\000', member_p=0 '\000',
declares_class_or_enum=0, function_definition_p=0x7fffffffd8ef "", 
    maybe_range_for_decl=0x0) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:14653
#5  0x00000000005ea030 in cp_parser_simple_declaration (parser=0x7ffff5ba00b0,
function_definition_allowed_p=1 '\001', maybe_range_for_decl=0x0)
    at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9712
#6  0x00000000005ea3e9 in cp_parser_block_declaration (parser=0x7ffff5ba00b0,
statement_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9598
#7  cp_parser_block_declaration (parser=0x7ffff5ba00b0, statement_p=0 '\000')
at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9532
#8  0x00000000005ee132 in cp_parser_declaration (parser=0x7ffff5ba00b0) at
/mnt/svn/gcc-trunk/gcc/cp/parser.c:9503
#9  cp_parser_declaration (parser=0x7ffff5ba00b0) at
/mnt/svn/gcc-trunk/gcc/cp/parser.c:9410
#10 0x00000000005ecc5a in cp_parser_declaration_seq_opt (parser=0x7ffff5ba00b0)
at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9389
#11 0x00000000005ee7a9 in cp_parser_translation_unit () at
/mnt/svn/gcc-trunk/gcc/cp/parser.c:3463
#12 c_parse_file () at /mnt/svn/gcc-trunk/gcc/cp/parser.c:25293
#13 0x00000000006c4285 in c_common_parse_file () at
/mnt/svn/gcc-trunk/gcc/c-family/c-opts.c:1077
#14 0x0000000000a2c95c in compile_file (argc=14, argv=0x7fffffffdba8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:579

Tested revisions:
r170622 - crash

Reply via email to