2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr39074-3.c
blob7c7604826216a2cfeb6fff4e4bf58b003be9aa93
1 /* { dg-do run } */
2 /* { dg-require-effective-target stdint_types } */
4 #include <stdint.h>
6 uintptr_t __attribute__((noinline,const)) bar(int ***p) { return (uintptr_t)p; }
7 extern void abort (void);
8 int main()
10 int i, j;
11 int *y = &j;
12 int **a = &y, **x;
13 int ***p;
14 uintptr_t b;
15 b = bar(&a);
16 p = (int ***)b;
17 x = *p;
18 *x = &i;
19 i = 1;
20 *y = 0;
21 if (i != 0)
22 abort ();
23 return 0;