This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23099] New: [4.0 regression] ICE in build_simple_base_path, at cp/class.c:460


The following test case:
------------------------------------------------------------
struct Base {
  int x;
};

template <typename T>
struct A {
  static const int N = sizeof(static_cast<Base*>(T()));
};

struct Derived : Base {
  A<Derived*> a;
};
------------------------------------------------------------ 

gcc 2.95.3: compiles

gcc 3.4.4: compiles

gcc 4.0.1: ICE
b1.cc: In instantiation of 'A<Derived*>':
b1.cc:11:   instantiated from here
b1.cc:7: internal compiler error: in build_simple_base_path, at cp/class.c:459

gcc-4.1-20050716: ICE     
bug.cc: In instantiation of 'A<Derived*>':
bug.cc:11:   instantiated from here
bug.cc:7: internal compiler error: in build_simple_base_path, at cp/class.c:460

gcc CVS 2005-07-25: ICE
b1.cc: In instantiation of 'A<Derived*>':
b1.cc:11:   instantiated from here
b1.cc:7: internal compiler error: in build_simple_base_path, at cp/class.c:461

Thanks to mec for uncovering this, and bgibbons for minimizing the
test case.

-- 
           Summary: [4.0 regression] ICE in build_simple_base_path, at
                    cp/class.c:460
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dank at kegel dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]