This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11987] New: ICE/accepts-invalid with inherited nested type
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2003 22:51:07 -0000
- Subject: [Bug c++/11987] New: ICE/accepts-invalid with inherited nested type
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11987
Summary: ICE/accepts-invalid with inherited nested type
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, accepts-invalid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
This piece of invalid code
----------------------------------------
template <int dim> struct X {
struct I { I(); };
};
template <int dim> struct Y : X<dim> {
typedef typename X<dim>::I I;
};
template <int dim>
Y<dim>::I::I () {} // note: I is nested type in X, not Y!
template struct Y<1>;
------------------------------------------------
ICEs everything up to and including 3.3:
parameter-estimation/libparest> /ices/bangerth/bin/gcc-3.3/bin/g++ -c x.cc
x.cc:10: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
On the other hand, present mainline accepts it, which I think is spurious. So
we traded an ICE for an accepts-invalid.
W.