1  /* { dg-do run { target vect_cmdline_needed } } */
       2  /* { dg-options "-O2 -fno-tree-loop-distribute-patterns -ftree-vectorize -fdump-tree-vect-details -fno-vect-cost-model" } */
       3  /* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
       4  /* The IBM Z backend sets the min-vect-loop-bound param to 2 to avoid
       5     awkward epilogue code generation in some cases.  This line needs to
       6     be removed after finding an alternate way to fix this.  */
       7  /* { dg-additional-options "--param min-vect-loop-bound=0" { target { s390*-*-* } } } */
       8  
       9  #include <stdlib.h>
      10  
      11  #define N 16
      12   
      13  int main ()
      14  {  
      15    struct {
      16      char ca[N];
      17    } s;
      18    int i;
      19  
      20    for (i = 0; i < N; i++)
      21      {
      22        s.ca[i] = 5;
      23      }
      24  
      25    /* check results:  */
      26    for (i = 0; i < N; i++)
      27      {
      28        if (s.ca[i] != 5)
      29          abort ();
      30      }
      31  
      32    return 0;
      33  }
      34  
      35  
      36  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { avr-*-* pru-*-* } } } } } */
      37  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! { avr-*-* pru-*-* } } } } } */