c++/8442: Wrongful compiler error - file available

Reichelt reichelt@igpm.rwth-aachen.de
Tue Nov 5 06:41:00 GMT 2002


Hi,

here's a little cleaned-up testcase:

--------------------------------snip here-----------------------------
template <typename T> struct A {};

template <typename T> struct B
{
    template <typename U> struct C {};
    template <typename U> A<C<U> > foo(U);
};

B<void> b;
--------------------------------snip here-----------------------------

With gcc 2.95.x and gcc 3.0.x the code compiles fine. With mainline
we get the following ICE

PR8442.cc: In instantiation of `B<void>':
PR8442.cc:9:   instantiated from here
PR8442.cc:6: error: type/value mismatch at argument 1 in template parameter 
   list for `template<class T> struct A'
PR8442.cc:6: error:   expected a type, got `C'
PR8442.cc:6: internal compiler error: tree check: expected var_decl, have 
   error_mark in tsubst_decl, at cp/pt.c:5793
Please submit a full bug report, [etc.]

which is replaced by an "confused by earlier errors" on the 3.2 branch
(checked on i686-pc-linux-gnu and mips-sgi-irix6.5).

Since this a regression, I rated the PR "high priority".

Greetings,
Volker

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8442




More information about the Gcc-bugs mailing list