1  /* { dg-require-effective-target vect_int } */
       2  /* { dg-add-options bind_pic_locally } */
       3  
       4  #include <stdarg.h>
       5  #include "tree-vect.h"
       6  
       7  #define N 128
       8  
       9  int ic[N*2];
      10  int ib[N];
      11  
      12  #define ia (ic+N)
      13  
      14  __attribute__ ((noinline))
      15  int main1 ()
      16  {
      17    int i, j;
      18  
      19    for (i = 0; i < N; i++)
      20      {
      21        ib[i] = i*3;
      22        asm volatile ("" ::: "memory");
      23      }
      24  
      25    for (i = 0; i < N; i++)
      26      {
      27         ia[i] = ib[i];
      28      }
      29  
      30    /* check results: */
      31    for (i = 0; i < N; i++)
      32      {
      33         if (ia[i] != ib[i])
      34           abort ();
      35      }
      36  
      37    return 0;
      38  }
      39  
      40  int main (void)
      41  {
      42    check_vect ();
      43  
      44    return main1 ();
      45  }
      46  
      47  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
      48  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */