111
|
1 /* { dg-do run } */
|
|
2 /* { dg-options "-Os -fno-inline-functions" } */
|
|
3
|
|
4 void abort (void);
|
|
5
|
|
6 typedef struct {
|
|
7 int x[7];
|
|
8 } agg7;
|
|
9
|
|
10 typedef struct {
|
|
11 int mbr1;
|
|
12 int mbr2;
|
|
13 } agg2;
|
|
14
|
|
15 int expected = 31415;
|
|
16 agg7 filler;
|
|
17
|
|
18 int GetConst (agg7 filler, agg2 split)
|
|
19 {
|
|
20 return expected;
|
|
21 }
|
|
22
|
|
23 void VerifyValues (agg7 filler, int last_reg, int first_stack, int second_stack)
|
|
24 {
|
|
25 if (first_stack != 123 || second_stack != expected)
|
|
26 abort ();
|
|
27 }
|
|
28
|
|
29 void RunTest (agg2 a)
|
|
30 {
|
|
31 int result;
|
|
32
|
|
33 result = GetConst (filler, a);
|
|
34 VerifyValues (filler, 0, a.mbr1, result);
|
|
35 }
|
|
36
|
|
37 int main(void)
|
|
38 {
|
|
39 agg2 result = {123, 456};
|
|
40 RunTest (result);
|
|
41 return 0;
|
|
42 }
|
|
43
|