PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / overload / defarg8.C
blobb3ddfbb76cf4619c4162bf3ed54037d2a8845b45
1 // PR c++/60367
2 // { dg-do run { target c++11 } }
4 extern "C" int printf (const char *, ...);
5 extern "C" void abort();
7 void *p;
8 struct foo {
9   foo() { p = this; }
10   foo (const foo &) { abort(); }
11   ~foo() { if (p != this) abort(); }
14 void do_something( foo f = {} )
16   if (&f != p) abort();
19 int main()
21  do_something();