2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wrestrict" } */
5 __attribute__((__malloc__
)) extern void *my_malloc (__SIZE_TYPE__
);
13 void *recmem
= __builtin_malloc (SIZE
);
17 void *oldrecmem
= recmem
;
18 recmem
= __builtin_malloc (SIZE
);
21 __builtin_free (oldrecmem
);
24 __builtin_memcpy (recmem
, oldrecmem
, SIZE
); /* { dg-bogus "accessing" } */
26 __builtin_free (oldrecmem
);
33 void *recmem
= my_malloc (SIZE
);
37 void *oldrecmem
= recmem
;
38 recmem
= my_malloc (SIZE
);
41 __builtin_free (oldrecmem
);
44 __builtin_memcpy (recmem
, oldrecmem
, SIZE
); /* { dg-bogus "accessing" } */
46 __builtin_free (oldrecmem
);