summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr25310.c
blob: 71081d821112265a221ea67e54270a969f87c0d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Prevent spurious test failures on 16-bit targets.  */
#if __INT_MAX__ >= 2147483647L

extern int f (char *, int);

void test (void)
{
  char buffer[65536];
  char *bufptr;
  char *bufend;
  int bytes;

  bufptr = buffer;
  bufend = buffer + sizeof(buffer) - 1;

  while ((bytes = f (bufptr, bufend - bufptr)) > 0)
    bufptr += bytes;
}

#endif