summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/setjmp-5.c
blob: 584762915deeaf7b81a6468b54c72cc866a630a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
/* { dg-require-effective-target indirect_jumps } */

#include <setjmp.h>

void bar (int);

jmp_buf buf;
int v;

void
foo (void)
{
  int i;
  bar (0);
  bar (1);
  i = 5;
  int j = setjmp (buf);
  if (j == 0)
    bar (2);
  v = i;	/* { dg-bogus "may be used uninitialized in this function" } */
}