summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20000605-3.c
blob: a5e29aefa4a92e0eb470957443d180f3532413ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
   20000605-3.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

struct F { int x; int y; };

void
testTortureExecute (void)
{
  int timeout = 0;
  int x = 0;
  while (1)
    {
      const struct F i = { x++, };
      if (i.x > 0)
	break;
      if (++timeout > 5)
	goto die;
    }
  return;
 die:
  ASSERT (0);
}