Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/pr25310.c

raw
1 /* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
2 /* { dg-require-stack-size "65536+20" } */
3
4 /* Prevent spurious test failures on 16-bit targets. */
5 #if __INT_MAX__ >= 2147483647L
6
7 extern int f (char *, int);
8
9 void test (void)
10 {
11 char buffer[65536];
12 char *bufptr;
13 char *bufend;
14 int bytes;
15
16 bufptr = buffer;
17 bufend = buffer + sizeof(buffer) - 1;
18
19 while ((bytes = f (bufptr, bufend - bufptr)) > 0)
20 bufptr += bytes;
21 }
22
23 #endif
24