summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/doloop-2.c
blob: f9811800269506e0b4bac3cf8e687841c1a84264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <limits.h>

extern void exit (int);
extern void abort (void);

volatile unsigned int i;

int
main (void)
{
  unsigned short z = 0;

  do ++i;
  while (--z > 0);
  if (i != USHRT_MAX + 1U)
    abort ();
  exit (0);
}