summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr89278.c
blob: 609cb1a53a9995353dbd816860d002aa956e8c9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR tree-optimization/89278 */
/* { dg-do compile } */
/* { dg-options "-O1 -ftrapv -ftree-loop-distribute-patterns --param max-loop-header-insns=2" } */

void
foo (int *w, int x, int y, int z)
{
  while (x < y + z)
    {
      w[x] = 0;
      ++x;
    }
}

void
bar (int *__restrict u, int *__restrict w, int x, int y, int z)
{
  while (x < y + z)
    {
      w[x] = u[x];
      ++x;
    }
}