summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/friend8.C
blob: e9992cdadf41924a215394be75784f66f3c0e57b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that we look up a friend declared at top level ahead of an
// undeclared friend found by argument dependent lookup.

// { dg-do run }

int f(int) { return 0; }

struct S {
  friend int f(char) { return 1; }
};

int main () { return f('a'); }