aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20151204.c
blob: a6bac5d7e1f6eb91f9c231b09bc3d8faf4f54459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-require-effective-target size20plus } */
/* { dg-require-stack-size "32753*2" } */

typedef __SIZE_TYPE__ size_t;

int strcmp (const char*, const char*);
void *memchr (const void *, int, size_t);
char* strncpy (char *, const char *, size_t);

int
main (int argc, char** argv)
{
  char target[32753] = "A";
  char buffer[32753];
  char *x;
  x = buffer;

  if (strcmp (target, "A")
      || memchr (target, 'A', 0) != ((void *) 0))
    if (strncpy (x, "", 4) != x);
  return 0;
}