[Bug c++/37552] New: [4.4 regression] ICE with invalid array access

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 17 06:23:00 GMT 2008


The following invalid code snippet triggers an ICE on mainline:

========================
extern struct A a[1];

void foo()
{
  a[0];
}
========================

bug.cc: In function 'void foo()':
bug.cc:5: error: invalid use of incomplete type 'struct A'
bug.cc:1: error: forward declaration of 'struct A'
bug.cc:5: internal compiler error: tree check: expected class 'expression',
have 'exceptional' (error_mark) in build_array_ref, at cp/typeck.c:2626
Please submit a full bug report, [etc.]

The regression appeared between 2008-08-29 and 2008-09-06.


-- 
           Summary: [4.4 regression] ICE with invalid array access
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list