view gcc/testsuite/c-c++-common/ubsan/pr71403-3.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-additional-options "-fsanitize=unreachable" } */


int a, b, c, d;

void
fn1 ()
{
  for (c = 0; c < 2; c++)
    {
      int e, f = 1;
      for (e = 0; e < 2; e++)
	{
	  if (!f)
	    return;
	  for (d = 0; d; d++)
	    f = b;
	}
    }
}

int
main ()
{
  for (; a < 1; a++)
    {
      fn1 ();
    }
  __builtin_exit (0);
}