1  /* { dg-require-effective-target vect_int } */
       2  /* { dg-require-effective-target vect_long_long } */
       3  
       4  #include <stdarg.h>
       5  #include "tree-vect.h"
       6  
       7  extern void abort(void);
       8  
       9  struct s {
      10      unsigned i : 31;
      11      char x : 2;
      12      char a : 4;
      13  };
      14  
      15  #define N 32
      16  #define V 5
      17  struct s A[N];
      18  
      19  void __attribute__ ((noipa))
      20  f(struct s *ptr, unsigned n) {
      21      for (int i = 0; i < n; ++i)
      22        ptr[i].a = V;
      23  }
      24  
      25  void __attribute__ ((noipa))
      26  check_f(struct s *ptr) {
      27      for (unsigned i = 0; i < N; ++i)
      28        if (ptr[i].a != V)
      29  	abort ();
      30  }
      31  
      32  int main (void)
      33  {
      34    check_vect ();
      35    __builtin_memset (&A[0], 0, sizeof(struct s) * N);
      36  
      37    f(&A[0], N);
      38    check_f (&A[0]);
      39  
      40    return 0;
      41  }
      42  
      43  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
      44