PR libstdc++/70940 make pmr::resource_adaptor return aligned memory
[official-gcc.git] / gcc / testsuite / gcc.dg / pr29683.c
blob4bed679b561b67f2a34f6704a2287365111009e1
1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-inline-functions" } */
4 void abort (void);
6 typedef struct {
7 int x[7];
8 } agg7;
10 typedef struct {
11 int mbr1;
12 int mbr2;
13 } agg2;
15 int expected = 31415;
16 agg7 filler;
18 int GetConst (agg7 filler, agg2 split)
20 return expected;
23 void VerifyValues (agg7 filler, int last_reg, int first_stack, int second_stack)
25 if (first_stack != 123 || second_stack != expected)
26 abort ();
29 void RunTest (agg2 a)
31 int result;
33 result = GetConst (filler, a);
34 VerifyValues (filler, 0, a.mbr1, result);
37 int main(void)
39 agg2 result = {123, 456};
40 RunTest (result);
41 return 0;