PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / call2.C
blob1b4d4b3fc6c83ac4165cce9fea7a18a5dbb726ac
1 // { dg-do run }
2 // { dg-options "-O" }
4 struct Foo
6   Foo() : a(1), b(1), c('a') {}
7   int a;
8   int b;
9   char c;
12 static Foo copy_foo(Foo) __attribute__((noinline, noclone));
14 static Foo copy_foo(Foo A)
16   return A;
19 struct Bar : Foo
21   Bar(Foo t) : Foo(copy_foo(t)) {}
24 Foo F;
26 int main (void)
28   Bar B (F);
30   if (B.a != 1 || B.b != 1 || B.c != 'a')
31     __builtin_abort ();
33   return 0;