gcc/testsuite/gcc.dg/uninit-pr111397.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -Wuninitialized" } */ |
| 3 | |
| 4 | int globalVar = 1; |
| 5 | int __attribute__ ((__returns_twice__)) test_setjmpex(void *context); |
| 6 | |
| 7 | void testfn() |
| 8 | { |
| 9 | int localVar = globalVar; |
| 10 | while (!localVar) { |
| 11 | test_setjmpex(__builtin_frame_address (0)); // { dg-bogus "uninitialized" } |
| 12 | if (globalVar) |
| 13 | break; |
| 14 | } |
| 15 | } |