1  /* { dg-require-effective-target vect_int } */
       2  
       3  #include <stdarg.h>
       4  #include "tree-vect.h"
       5  
       6  #define N 16 
       7  
       8  typedef struct {
       9     int a;
      10     int b;
      11     int c;
      12     int d;
      13  } s;
      14  
      15  
      16  s arr[N] = {{7,0,1,5}, {7,2,3,5}, {7,4,5,5}, {7,6,7,5}, {7,8,9,5}, {7,10,11,5}, {7,12,13,5}, {7,14,15,5}, {7,16,17,5}, {7,18,19,5}, {7,20,21,5}, {7,22,23,5}, {7,24,25,5}, {7,26,27,5}, {7,28,29,5}, {7,30,31,5}};
      17  
      18  __attribute__ ((noinline)) int
      19  main1 ()
      20  {
      21    s *p = arr, *q = arr + 1;
      22    int res[N];
      23    int i;
      24  
      25    for (i = 0; i < N-1; i++)
      26      {
      27        res[i] = p->b + p->d + q->b;
      28        p++;
      29        q++;
      30      }
      31    
      32    /* check results:  */
      33    for (i = 0; i < N-1; i++)
      34      {
      35        if (res[i] != arr[i].b + arr[i].d + arr[i+1].b)
      36  	abort ();
      37      }
      38  
      39    return 0;
      40  }
      41  
      42  int main (void)
      43  {
      44    int i;
      45    
      46    check_vect ();
      47  
      48    main1 ();
      49  
      50    return 0;
      51  }
      52  
      53