1 struct S { char c1, c2, c3, c4; } __attribute__((aligned(4))); 2 3 static char bar (char **p) __attribute__((noclone, noinline)); 4 static struct S foo (void) __attribute__((noclone, noinline)); 5 6 int i; 7 8 static char bar(char ** p)9bar (char **p) 10 { 11 i = 1; 12 return 0; 13 } 14 15 static struct S foo(void)16foo (void) 17 { 18 struct S ret; 19 char r, s, c1, c2; 20 char *p = &r; 21 22 s = bar (&p); 23 if (s) 24 c2 = *p; 25 c1 = 0; 26 27 ret.c1 = c1; 28 ret.c2 = c2; 29 return ret; 30 } 31 main(void)32int main (void) 33 { 34 struct S s = foo (); 35 if (s.c1 != 0) 36 __builtin_abort (); 37 return 0; 38 } 39