This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34059] New: [4.1/4.2/4.3 regression] ICE with invalid base type for class member
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Nov 2007 20:22:00 -0000
- Subject: [Bug c++/34059] New: [4.1/4.2/4.3 regression] ICE with invalid base type for class member
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE since GCC 4.1.2:
===============================
struct A
{
template<int> void foo();
};
struct B : A {};
struct C : A {};
void bar()
{
B().C::foo<0>();
}
===============================
bug.cc: In function 'void bar()':
bug.cc:11: internal compiler error: in build_base_path, at cp/class.c:272
Please submit a full bug report, [etc.]
Before GCC 3.4.0 we generated a correct diagnostic:
bug.cc:11: error: type `C' is not a base type for type `B'
GCC 3.4.0 - 4.1.1 wrongly accepted the code.
--
Summary: [4.1/4.2/4.3 regression] ICE with invalid base type for
class member
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, 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=34059