view gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O3 -fcilkplus" } */

volatile int *a, *b, N;
typedef int tint;
struct someclass {
  int a;
  char b;
  int *p;
};

void foo()
{
#pragma simd vectorlength(4) vectorlength(8) /* { dg-error "too many 'vectorlength' clauses" } */
  for (int i=0; i < N; ++i)
    a[i] = b[i];

#pragma simd vectorlength(3) /* { dg-error "must be a power of 2" } */
  for (int i=0; i < N; ++i)
    a[i] = b[i];
}