aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/gomp/simd4.c
blob: 37901b6a07f240d99ab427dc32ce10861ee8bb49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
/* { dg-additional-options "-std=c99" { target c } } */

struct S *p;	/* { dg-error "forward declaration" "" { target c++ } } */
float f;
int j;

void
foo (void)
{
#pragma omp simd linear(p) linear(f : 1)
  for (int i = 0; i < 10; i++)
    ;
#pragma omp simd linear(j : 7.0)	/* { dg-error "step expression must be integral" } */
  for (int i = 0; i < 10; i++)
    ;
}

/* { dg-error "linear clause applied to" "" { target *-*-* } 12 } */
/* { dg-error "(incomplete|undefined) type" "" { target *-*-* } 12 } */