summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/koenig1.C
blob: a4612591967416a437c8fb727a2979c7115f1104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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); // { dg-message "N::f" }
  struct A;
}

struct B;

void g ()
{
  B *bp;
  N::A *ap;
  f (bp);			// { dg-error "not declared" }
  // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 16 }
  f (ap);
}