1 /* { dg-do run } */
2 /* { dg-options "-O3" } */
3 
4 typedef unsigned int myint __attribute__((aligned(1)));
5 
6 typedef struct S {
7   unsigned a, b, c;
8 } SS;
9 
10 typedef struct U {
11   SS s[2];
12 } UU;
13 
14 typedef UU __attribute__((aligned(1))) UUU;
15 
16 static unsigned int __attribute__ ((noinline))
get_a(SS s)17 get_a (SS s)
18 {
19   return s.a;
20 };
21 
22 static int __attribute__ ((noinline, noclone))
foo(UUU * p)23 foo (UUU *p)
24 {
25   int r = (int) get_a(p->s[0]) + 2;
26   return r;
27 }
28 
29 char buf[512];
30 
31 static UUU * __attribute__ ((noinline, noclone))
get_uuu(void)32 get_uuu (void)
33 {
34   return (UUU *)(buf + 1);
35 }
36 
37 int
main(int argc,char * argv[])38 main(int argc, char *argv[])
39 {
40   UUU *p = get_uuu();
41   if (foo(p) != 2)
42     __builtin_abort ();
43   return 0;
44 }
45