1 /* { dg-do run } */
2 
3 struct S { int *mem; };
4 
5 struct S * __attribute__((noinline,noipa))
foo()6 foo ()
7 {
8   struct S *s = __builtin_malloc (sizeof (struct S));
9   s->mem = __builtin_malloc (sizeof (int));
10   s->mem[0] = 1;
11   return s;
12 }
13 
14 int
main()15 main()
16 {
17   struct S *s = foo();
18   if (s->mem[0] != 1)
19     __builtin_abort ();
20   return 0;
21 }
22