[Bug c++/28740] New: [4.0/4.1/4.2 regression] ICE with invalid inheritance

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Aug 15 18:56:00 GMT 2006


The following invalid testcase triggers an ICE since GCC 4.0.0:

=========================================
struct A { virtual ~A(); };

struct B : A A {};

A foo(const B &b)
{
  return b;
}
=========================================

bug.cc:3: error: expected `{' before 'A'
bug.cc:3: error: function definition does not declare parameters
bug.cc: In function 'A foo(const B&)':
bug.cc:7: internal compiler error: in build_simple_base_path, at cp/class.c:475
Please submit a full bug report, [etc.]


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with invalid inheritance
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: minor
          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=28740



More information about the Gcc-bugs mailing list