summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr27335.c
blob: d08db30bdbfc0752a629917fcea6f871bb743e42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile } */
/* { dg-options "-O2 -funroll-loops" } */

extern void bar () __attribute__ ((noreturn));

inline double
baz (double *x, unsigned int y)
{
  if (y >= 6)
    bar ();
  return x[y];
}

double *a, *b;

void
foo ()
{
  unsigned int r, s, t;

  for (r = 0; r < 2; r++)
    for (t = 0; t < 2; t++)
      {
        for (s = 0; s < 3; s++)
          b[r * 2 + t] += baz (a, 3 * s + t);
      }
}