c++/10108: [3.4 regression] Error recovering problem: tree checking ICE: expected var_decl, have error_mark in tsubst_decl
Giovanni Bajo
giovannibajo@libero.it
Wed May 7 11:10:00 GMT 2003
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10108
Reduced snippet is:
---------------------------------------------------------------
template <class>
struct Foo
{};
template <class T>
struct Bar : public Foo<T>
{
typedef Foo<T> base;
typedef typename base::NON_EXISTENT INVALID_TYPE;
template <class Q>
Bar(Q q, INVALID_TYPE a)
: base(a)
{}
};
template struct Bar<void>;
---------------------------------------------------------------
pr10108.cpp: In instantiation of `Bar<void>':
pr10108.cpp:17: instantiated from here
pr10108.cpp:9: error: no type named `NON_EXISTENT' in `struct Foo<void>'
pr10108.cpp:13: error: no type named `NON_EXISTENT' in `struct Foo<void>'
pr10108.cpp:13: internal compiler error: tree check: expected var_decl, have
error_mark in tsubst_decl, at cp/pt.c:5957
Please submit a full bug report,
This is ICE on error recovery, confirmed with 3.4 CVS 20030503. The same
preprocessed source also generates totally different ICE-on-illegal for 3.2
branch and 3.3 branch. I isolated and reported the 3.3 branch failure in
c++/10594.
Giovanni Bajo
More information about the Gcc-bugs
mailing list