[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / access16.C
blobbb7ebccb8b587763087a4a153bc69cde08a0978f
1 // PR c++/23842
3 struct S;
4 extern S *p;
5 template <class T> int f(T*, int y = ((T*)p)->x) {
6         return y;
8 struct S {
9 private:
10   int x;
11   template <class U> friend int f(U*, int);
13 int g() {
14   return f(p);
16