1 /* PR rtl-optimization/55023 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fno-inline" } */
4
5 extern void abort (void);
6 typedef long long int64_t;
7
8 struct foo {
9 int x;
10 int y;
11 };
12
foo(int64_t a,int64_t b,int64_t c)13 int64_t foo(int64_t a, int64_t b, int64_t c)
14 {
15 return a + b + c;
16 }
17
bar(int64_t a,struct foo bq,struct foo cq)18 int64_t bar(int64_t a, struct foo bq, struct foo cq)
19 {
20 int64_t b = bq.x + bq.y;
21 int64_t c = cq.x + cq.y;
22 return foo(a, b, c);
23 }
24
main(void)25 int main(void)
26 {
27 int64_t a = 1;
28 struct foo b = { 2, 3 };
29 struct foo c = { 4, 5 };
30 if (bar (a, b, c) != 15)
31 abort ();
32 return 0;
33 }
34