aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr101445.c
blob: 57a94954cc339d5c381a8f37f69a935bc6551fbb (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
#include "tree-vect.h"

int a[35] = { 1, 1, 3 };

void __attribute__((noipa))
foo ()
{
  for (int b = 4; b >= 0; b--)
    {
      int tem = a[b * 5 + 3 + 1];
      a[b * 5 + 3] = tem;
      a[b * 5 + 2] = tem;
      a[b * 5 + 1] = tem;
      a[b * 5 + 0] = tem;
    }
}

int main()
{
  check_vect ();
  foo ();
#pragma GCC novector
  for (int d = 0; d < 25; d++)
    if (a[d] != 0)
      __builtin_abort ();
  return 0;
}