This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/5754: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, seth dot goldberg at sun dot com
- Date: 8 May 2003 23:02:47 -0000
- Subject: Re: c++/5754: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, seth dot goldberg at sun dot com, gcc-gnats at gcc dot gnu dot org
Old Synopsis: [2003-01-21] g++ segfaults on compilation of template-enriched code
New Synopsis: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu May 8 23:02:47 2003
State-Changed-Why:
This is actually related to something that has been
recently fixed:
----------------------------
struct P {};
template <typename >
struct O
{
struct I;
};
template <typename T>
struct O<T>::I::S : P
{};
-------------------------
Note that S doesn't exist, since I isn't declared (except
for the forward declaration, of course). If I isn't
derived from P, then we get a proper error message since
recently. If it is, as in the snippet above, then we get
an ICE with 3.3, and a tree checking error in 3.4:
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
x.cc:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:10: error: could not resolve typename type
x.cc:10: internal compiler error: tree check: expected class 'd', have 'x' (
error_mark) in cp_parser_class_head, at cp/parser.c:11804
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Note that 3.3 doesn't give an error message before
crashing. On the other hand, 2.95 at least said
g/x> c++ -c x.cc
x.cc:10: `typename O<{anonymous template type parm}>::I' does not have a nested type named `S'
x.cc:10: template class without a name
x.cc:10: template class without a name
x.cc:11: confused by earlier errors, bailing out
I think this is thus a regression of sorts.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5754