Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr45967-2.c

raw
1 /* { dg-do run } */
2
3 extern void abort (void);
4 int b;
5 void
6 foo (void *p_, int *q)
7 {
8 int *p;
9 int i;
10 for (i = 0; i < sizeof(int *); ++i)
11 ((char *)&p)[i] = ((char *)p_)[i];
12 if (b)
13 p = q;
14 *p = 1;
15 }
16 int main()
17 {
18 int i = 0, j;
19 int *p = &i;
20 foo (&p, &j);
21 if (i != 1)
22 abort ();
23 return 0;
24 }