re PR c++/9336 (ICE in cp_line_of, at cp/error.c:2191)
authorJason Merrill <jason@gcc.gnu.org>
Thu, 13 Mar 2003 20:45:22 +0000 (15:45 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 13 Mar 2003 20:45:22 +0000 (15:45 -0500)
        PR c++/9336
        * decl2.c (lookup_arg_dependent): Handle error_mark_node.

[[Split portion of a mixed commit.]]

From-SVN: r64322.2

gcc/testsuite/g++.dg/overload/koenig1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/overload/koenig1.C b/gcc/testsuite/g++.dg/overload/koenig1.C
new file mode 100644 (file)
index 0000000..dd38e72
--- /dev/null
@@ -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);
+}