blob: 884d3d58ce2d3d08798763818fb00e7caf73e236 [file] [log] [blame]
/* { dg-do run } */
struct S { int *mem; };
struct S * __attribute__((noinline,noipa))
foo ()
{
struct S *s = __builtin_malloc (sizeof (struct S));
s->mem = __builtin_malloc (sizeof (int));
s->mem[0] = 1;
return s;
}
int
main()
{
struct S *s = foo();
if (s->mem[0] != 1)
__builtin_abort ();
return 0;
}