1/* { dg-do compile } */
2/* { dg-options "-O1" } */
3
4/* This used to result in an ICE.  */
5
6_Decimal64 y[258][258];
7_Decimal64 dd[258][258];
8_Decimal64 ry[258][258];
9_Decimal64
10foo (void)
11{
12  int i;
13  int j;
14  int m;
15  int im;
16  int jm;
17  int ip;
18  int jp;
19  int i2m;
20  int i1p;
21  _Decimal64 a;
22  _Decimal64 b;
23  _Decimal64 c;
24  _Decimal64 qi;
25  _Decimal64 qj;
26  _Decimal64 xx;
27  _Decimal64 yx;
28  _Decimal64 xy;
29  _Decimal64 yy;
30  _Decimal64 rel;
31  _Decimal64 qxx;
32  _Decimal64 qyy;
33  _Decimal64 qxy;
34  do
35    {
36      jp = j + 1;
37      for (i = i1p; i <= i2m; i++)
38	{
39	  ip = i + 1;
40	  yx = y[ip][j] - y[im][j];
41	  yy = y[i][jp] - y[i][jm];
42	  a = 0.25dd * (xy * xy + yy * yy);
43	  b = 0.25dd * (xx * xx + yx * yx);
44	  c = 0.125dd * (xx * xy + yx * yy);
45	  qj = 0.0dd;
46	  dd[i][m] = b + a * rel + b;
47	  qxx = y[ip][j] - 2.0dd * y[i][j] + y[im][j];
48	  qyy = y[i][jp] - 2.0dd * y[i][j] + y[i][jm];
49	  qxy = y[ip][jp] - y[ip][jm] - y[im][jp] + y[im][jm];
50	  ry[i][m] = a * qxx + b * qyy - c * qxy + yx * qi + yy * qj;
51	}
52    }
53  while (1);
54}
55