1  /* { dg-do run } */
       2  
       3  #include "tree-vect.h"
       4  
       5  void __attribute__((noipa))
       6  foo (long *a, int off, int n)
       7  {
       8    for (int i = 0; i < n; ++i)
       9      {
      10        long tem1 = a[0];
      11        long tem2 = a[1];
      12        long tem3 = a[2];
      13        long tem4 = a[off + 1];
      14        a[0] = tem4;
      15        long tem5 = a[off + 2];
      16        a[1] = tem5;
      17        long tem6 = a[off + 3];
      18        a[2] = tem6;
      19        a[off + 1] = tem1;
      20        a[off + 2] = tem2;
      21        a[off + 3] = tem3;
      22        a -= 3;
      23      }
      24  }
      25  
      26  int main ()
      27  {
      28    long a[3 * 9];
      29    check_vect ();
      30    for (int i = 0; i < 3 * 9; ++i)
      31      a[i] = i;
      32    foo (a + 3 * 5, 6-1, 5);
      33    const long b[3 * 8] = { 0, 1, 2, 21, 22, 23, 18, 19, 20, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
      34    for (int i = 0; i < 3 * 8; ++i)
      35      if (a[i] != b[i])
      36        __builtin_abort ();
      37    return 0;
      38  }