Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/pr38236.c

raw
1 struct X { int i; };
2
3 int __attribute__((noinline))
4 foo (struct X *p, int *q, int a, int b)
5 {
6 struct X x, y;
7 if (a)
8 p = &x;
9 if (b)
10 q = &x.i;
11 else
12 q = &y.i;
13 *q = 1;
14 return p->i;
15 }
16 extern void abort (void);
17 int main()
18 {
19 if (foo((void *)0, (void *)0, 1, 1) != 1)
20 abort ();
21 return 0;
22 }