PR c++/60336
[official-gcc.git] / gcc / testsuite / g++.dg / abi / empty23.C
blobdbeda81fb24c8946744640e5f17fdc6fd547d820
1 // PR c++/60336
2 // { dg-do run }
3 // { dg-options "-Wabi=11" }
5 struct S
7   struct { } a;
8   __extension__ int b[0];
9 };
11 struct S s;
12 struct S a[5];
14 void
15 foo (struct S, struct S *arg1, struct S) // { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } }
17   if (arg1 != &a[1])
18     __builtin_abort ();
21 int
22 main ()
24   foo (s, &a[1], a[2]); // { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } }