PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.dg / pr55023.c
blob8f6b300b17bb469e1488b5037349f8f0abe7404d
1 /* PR rtl-optimization/55023 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fno-inline" } */
5 extern void abort (void);
6 typedef long long int64_t;
8 struct foo {
9 int x;
10 int y;
13 int64_t foo(int64_t a, int64_t b, int64_t c)
15 return a + b + c;
18 int64_t bar(int64_t a, struct foo bq, struct foo cq)
20 int64_t b = bq.x + bq.y;
21 int64_t c = cq.x + cq.y;
22 return foo(a, b, c);
25 int main(void)
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;