Release: gcc 3.2 Environment: HP-UX itanium2 B.11.22 U ia64 3300317291
The code is invalid, the "class/typename" keyword is missing in line 2560ff: template< _Alloc> class allocator; template< _CharT, _Traits = char_traits<_CharT>, _Alloc = allocator<_CharT> > class basic_string; So we have on ice-on-invalid-code. A reduced example is: -------------------------------------------------------------- template <BOGUS> struct A; namespace std {} -------------------------------------------------------------- The error message (3.3) is: PR10898.cc:1: error: parse error before `>' token PR10898.cc:2: internal compiler error: in resume_binding_level, at cp/decl.c:598 Please submit a full bug report, [etc.] The code crashes gcc 3.0 - 3.3 (checked on i686-pc-linux-gnu). Gcc 2.95.3 and mainline work fine.
Fixing the missing "typename" keyword, I get another ICE, this time a segfault, which can be reduced to the following code snippet: ---------------------------------------------------------------- template <BOGUS> struct A { typedef BOGUS X; int i; }; ---------------------------------------------------------------- PR10898B.cc:1: error: parse error before `>' token PR10898B.cc:4: error: template declaration of `int i' PR10898B.cc:4: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] This ICE can be observed with gcc 2.95.x - 3.3. The bug is fixed on mainline. Btw., it looks as if all keywords "typename" were erased in "param.ii". That needs to be fixed in order to make the code compile.
*** Bug 10708 has been marked as a duplicate of this bug. ***
Moving target back to 3.3.1.
Closing as it is fixed in the mainline and there is a sensible error message there.