aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/loop-3.c
blob: eca9f24ea84ee973161d26bbf9bd5b510beb8c22 (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
/* { dg-additional-options "-std=gnu89" } */

#include <limits.h>

int n = 0;

g (i)
{
  n++;
}

f (m)
{
  int i;
  i = m;
  do
    {
      g ((int)((unsigned)i * INT_MAX) / 2);
    }
  while (--i > 0);
}

main ()
{
  f (4);
  if (n != 4)
    abort ();
  exit (0);
}