gcc/testsuite/gcc.dg/analyzer/torture/empty-struct-1.c
raw| 1 | struct empty {}; |
| 2 | |
| 3 | struct empty g; |
| 4 | |
| 5 | extern void sink (struct empty e); |
| 6 | |
| 7 | void test_1 (struct empty a) |
| 8 | { |
| 9 | sink (a); /* { dg-bogus "uninit" } */ |
| 10 | } |
| 11 | void test_2 () |
| 12 | { |
| 13 | struct empty a, b; |
| 14 | b = a; |
| 15 | g = b; |
| 16 | sink (b); /* { dg-bogus "uninit" } */ |
| 17 | /* ...as there's nothing to initialize. */ |
| 18 | } |