view gcc/testsuite/gcc.dg/pr57287.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
/* { dg-require-effective-target indirect_jumps } */

#include <setjmp.h>

jmp_buf buf;

void foo (int);
void bar (int) __attribute__((leaf));

void enumerate_locals (int indent)
{
  foo (0);
  while (indent--)
    {
      int local_indent = 8 + (8 * indent);
      if (local_indent != 8)
	{
	  setjmp (buf);
	  bar (local_indent);  /* { dg-bogus "may be used uninitialized" } */
	}
    }
  foo (1);
}