[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / struct_return.c
blob6d90b7e59537ea66ad89e3615a2b11f2838b8779
1 /* Test the absence of a spurious move from x8 to x0 for functions
2 return structures. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
6 struct s
8 long x;
9 long y;
10 long z;
13 struct s __attribute__((noinline))
14 foo (long a, long d, long c)
16 struct s b;
17 b.x = a;
18 b.y = d;
19 b.z = c;
20 return b;
23 int
24 main (void)
26 struct s x;
27 x = foo ( 10, 20, 30);
28 return x.x + x.y + x.z;
31 /* { dg-final { scan-assembler-not "mov\tx0, x8" } } */