gcc/testsuite/gcc.dg/pr113013.c
raw| 1 | /* PR tree-optimization/113013 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=gnu99 -O2" } */ |
| 4 | |
| 5 | struct S { short x; } s; |
| 6 | void *foo () __attribute__((__alloc_size__(1))); |
| 7 | struct S *p; |
| 8 | |
| 9 | __SIZE_TYPE__ |
| 10 | bar (void) |
| 11 | { |
| 12 | p = foo (s); |
| 13 | return __builtin_dynamic_object_size (p, 0); |
| 14 | } |