2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr33560.c
blob7eea1e3f6019a4f0f24157a53ebf5f6b5f3a6b92
1 /* { dg-do run } */
3 struct T
5 int a, b;
6 } t;
8 __attribute__((noinline)) struct T *f (struct T *p)
10 struct T *q = __builtin_malloc (sizeof (struct T));
11 *q = *p;
12 return q;
15 int main (void)
17 struct T *p;
19 t.a = 1;
20 t.b = 2;
21 p = f (&t);
22 t.a = 3;
24 if (p->a != 1)
25 __builtin_abort ();
27 return 0;