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 SS __attribute__((aligned(1))) SSS;
11 
12 
13 static unsigned int __attribute__ ((noinline))
get_a(SS s)14 get_a (SS s)
15 {
16   return s.a;
17 };
18 
19 static int __attribute__ ((noinline, noclone))
foo(SSS * p)20 foo (SSS *p)
21 {
22   int r = (int) get_a(*p) + 2;
23   return r;
24 }
25 
26 char buf[512];
27 
28 static SSS * __attribute__ ((noinline, noclone))
get_sss(void)29 get_sss (void)
30 {
31   return (SSS *)(buf + 1);
32 }
33 
34 int
main(int argc,char * argv[])35 main(int argc, char *argv[])
36 {
37   SSS *p = get_sss();
38   if (foo(p) != 2)
39     __builtin_abort ();
40   return 0;
41 }
42