aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr55569.c
blob: 6c2c7c7b6f7e0dae3776c87a705746354a23b579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-options "-Wno-stringop-overflow -ftree-vectorize" } */
int *bar (void);

void
foo (void)
{
  __INTPTR_TYPE__ x;
  int *y = bar ();

  /* The loop below may be optimized to a call to memset with a size
     that's in excess of the maximum object size.  This is diagnosed
     by the -Wstringop-overflow option.  */
  for (x = -1 / sizeof (int); x; --x, ++y)
    *y = 0;
}