gcc/testsuite/gcc.dg/pr118024.c
raw| 1 | /* PR middle-end/118024 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-fstrub=all" } */ |
| 4 | /* { dg-require-effective-target strub } */ |
| 5 | |
| 6 | void *realloc (void *, __SIZE_TYPE__); |
| 7 | void *reallocarray (void *); |
| 8 | void *reallocarray (void *) __attribute__((__malloc__(reallocarray))); |
| 9 | |
| 10 | void * |
| 11 | foo (void) |
| 12 | { |
| 13 | char *buf = reallocarray (0); |
| 14 | return realloc (buf, 1); |
| 15 | } |