summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr47684.c
blob: 475aa1549b81bb4124d34f31bea2b761cc9a366f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR debug/47684 */
/* { dg-do compile } */
/* { dg-options "-O3 -fcompare-debug" } */

int in[8][4];
int out[4];

void
foo (void)
{
  int sum = 1;
  int i, j, k;
  for (k = 0; k < 4; k++)
    {
      for (j = 0; j < 4; j++)
	for (i = 0; i < 4; i++)
	  sum *= in[i + k][j];
      out[k] = sum;
    }
}