Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / g++.dg / pr79761.C
bloba97325a1fc4db45159ff400ee7b012c813cbc6bd
1 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms" } */
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;