aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/Warray-bounds-9.c
blob: 92bcd4e5ce7a2eb3b58287b02ef2fcc53852fd27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O3 -Warray-bounds" } */

int a[8];

void
test(unsigned int n)
{
  unsigned int i;
  unsigned int j;
  if (n<8)
    for (j=0;j<n;j++)
      {
	i = j;
	do
	  a[i+1]=a[i];
	while (i--);
      }
}