diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/compat/struct-complex-2_y.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/compat/struct-complex-2_y.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/compat/struct-complex-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-complex-2_y.c new file mode 100644 index 000000000..54a72fa43 --- /dev/null +++ b/gcc/testsuite/gcc.dg/compat/struct-complex-2_y.c @@ -0,0 +1,23 @@ +/* { dg-options "-O -Wno-psabi" } */ + +#ifdef __x86_64__ +#include <stdlib.h> +#include "struct-complex-2.h" + +void +bar(struct st x) +{ + if (x.s1 != 1 + || __real__ x.x != 2 || __imag__ x.x != 4) + abort (); +} + +void +foo(struct stc x) +{ + if (x.s1 != 1 || x.x.r != 2 || x.x.i != 4) + abort (); +} +#else +int dummy_y; +#endif |