aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pr111397.c
blob: ec12f9d642a6e2e4500934ecfe384540334e3185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */

int globalVar = 1;
int __attribute__ ((__returns_twice__)) test_setjmpex(void *context);

void testfn()
{
  int localVar = globalVar;
  while (!localVar) {
      test_setjmpex(__builtin_frame_address (0)); // { dg-bogus "uninitialized" }
      if (globalVar)
	break;
  }
}