Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr77648-1.c

raw
1 /* { dg-do run } */
2
3 struct S { int *p; int *q; };
4
5 int **__attribute__((noinline,noclone,pure)) foo (struct S *s)
6 {
7 int tem;
8 __asm__ ("" : "=g" (tem) : "g" (s->p));
9 return &s->q;
10 }
11
12 int main()
13 {
14 struct S s;
15 int i = 1, j = 2;
16 int **x;
17 s.p = &i;
18 s.q = &j;
19 x = foo (&s);
20 **x = 7;
21 if (j != 7)
22 __builtin_abort ();
23 return 0;
24 }