aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cilk-plus/pragma_simd_tests/execute/vlength_comma2.c
blob: b049c507d92ef32735949c919123263ec93e2b7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
int a[100];

int
main (int argc, char **argv)
{
  int i;

  for (i = 0; i < 100; i++)
    if (argc == 1) 
      a[i] = 10;
    else
      a[i] = argc * 5;

#pragma simd vectorlength(4, 8, sizeof (int) == 4 ? 4 : 8)
  for (i = 0; i < 100; i++) 
    a[i] += 1;

  for (i = 0; i < 100; i++)
    if (a[i] != 11)
      return 1;

  return 0;
}