summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20050111-2.c
blob: 17e59ce968c44474ed883d17d3c90e77d09b6e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR rtl-optimization/15139 */
/* { dg-do compile } */
/* { dg-options "-O2 -funroll-loops" } */

void
foo (double **a, double **z)
{
  long int i, j;
  double d = -1.0;

  for (i = 0; i < 6; i++)
    for (j = 0; j < 5; j++)
      d = z[i][j] > d ? z[i][j] : d;

  for (i = 0; i < 6; i++)
    for (j = 0; j < 5; j++)
      z[i][j] /= d;

  for (i = 0; i < 5; i++)
    a[i][j] = z[i][j];
}