LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / pr65358.c
blobba89fd4818bee39f515b79195ae0c6fcb04ef52d
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 struct pack
6 int fine;
7 int victim;
8 int killer;
9 };
11 int __attribute__ ((__noinline__, __noclone__))
12 bar (int a, int b, struct pack p)
14 if (a != 20 || b != 30)
15 __builtin_abort ();
16 if (p.fine != 40 || p.victim != 50 || p.killer != 60)
17 __builtin_abort ();
18 return 0;
21 int __attribute__ ((__noinline__, __noclone__))
22 foo (int arg1, int arg2, int arg3, struct pack p)
24 return bar (arg2, arg3, p);
27 int main (void)
29 struct pack p = { 40, 50, 60 };
31 (void) foo (10, 20, 30, p);
32 return 0;