[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / fn-ptr2.C
blob742135a1e38099ae04afe952c274cd97d50690aa
1 // PR c++/56095
3 int *a(void) { return 0; }
4 typedef void voidfn(void);
5 template <voidfn* b> void z1(void) {}
6 template <voidfn& b> void z2(void) {}
8 int main()
10   z1<(voidfn*)a>();                   // { dg-error "" }
11   z1<reinterpret_cast<voidfn*>(a)>(); // { dg-error "" }
12   z2<(voidfn&)a>();                   // { dg-error "" }
13   z2<reinterpret_cast<voidfn&>(a)>(); // { dg-error "" }