summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-loop-7.c
blob: 80c21732a8eff5b63de99215df6c29e71a406ef0 (plain)
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
/*
   loop-7.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

void foo (unsigned int n)
{
  int i, j = -1;

  for (i = 0; i < 10 && j < 0; i++)
    {
      if ((1UL << i) == n)
	j = i;
    }

  if (j < 0)
    ASSERT (0);
}

void
testTortureExecute (void)
{
  foo (64);
  return;
}