re PR c++/9336 (ICE in cp_line_of, at cp/error.c:2191)

PR c++/9336
        * decl2.c (lookup_arg_dependent): Handle error_mark_node.

[[Split portion of a mixed commit.]]

From-SVN: r64322.2
This commit is contained in:
Jason Merrill 2003-03-13 15:45:22 -05:00
parent 3033f0ede8
commit 6d7b8b3509

View File

@ -0,0 +1,18 @@
// PR c++/9336
// Bug: The first, invalid call to f caused us to crash on the second,
// valid call.
namespace N {
template <class T> void f (T);
struct A;
}
struct B;
void g ()
{
B *bp;
N::A *ap;
f (bp); // { dg-error "undeclared" }
f (ap);
}