PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20171008-1.c
blobcde807a70b3887b324f67635f17e3c541e7aec61
1 struct S { char c1, c2, c3, c4; } __attribute__((aligned(4)));
3 static char bar (char **p) __attribute__((noclone, noinline));
4 static struct S foo (void) __attribute__((noclone, noinline));
6 int i;
8 static char
9 bar (char **p)
11 i = 1;
12 return 0;
15 static struct S
16 foo (void)
18 struct S ret;
19 char r, s, c1, c2;
20 char *p = &r;
22 s = bar (&p);
23 if (s)
24 c2 = *p;
25 c1 = 0;
27 ret.c1 = c1;
28 ret.c2 = c2;
29 return ret;
32 int main (void)
34 struct S s = foo ();
35 if (s.c1 != 0)
36 __builtin_abort ();
37 return 0;