summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr34330.c
blob: 0ed2f9fb39545b7c557b54d030da8a9fac5c7793 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-require-effective-target pthread } */
/* { dg-options "-ftree-parallelize-loops=4 -ftree-vectorize" } */

struct T
{
  int t;
  struct { short s1, s2, s3, s4; } *s;
};

void
foo (int *a, int *b, int *c, int *d, struct T *e)
{
  int i;
  for (i = 0; i < e->t; i++)
    {
      e->s[i].s1 = a[i];
      e->s[i].s2 = b[i];
      e->s[i].s3 = c[i];
      e->s[i].s4 = d[i];
    }
}