2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr45982.c
blob4aea6a8d8e47eec1d1cdc52890d0ba78c3d12e15
1 /* { dg-do run } */
2 /* { dg-options "-std=c99" } */
4 #include <stdint.h>
6 extern void abort (void);
8 uintptr_t __attribute__((pure,noinline,noclone))
9 foo (int *a)
11 return (uintptr_t) a;
14 void __attribute__((noinline,noclone))
15 bar (uintptr_t a)
17 int *p = (int *)a;
18 *p = 1;
21 int main()
23 int t = 0;
24 bar (foo (&t));
25 if (t != 1)
26 abort ();
27 return 0;