]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/gomp/nontemporal-2.c
* builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / gomp / nontemporal-2.c
1 /* { dg-do compile } */
2
3 #define N 1024
4 extern int a[N], b[N], c[N], d[N];
5
6 void
7 foo (void)
8 {
9 int i;
10 #pragma omp simd nontemporal (a, b) aligned (a, b, c)
11 for (i = 0; i < N; ++i)
12 a[i] = b[i] + c[i];
13 #pragma omp simd nontemporal (d) nontemporal (d) /* { dg-error "'d' appears more than once in 'nontemporal' clauses" } */
14 for (i = 0; i < N; ++i)
15 d[i] = 2 * c[i];
16 #pragma omp simd nontemporal (a, b, b) /* { dg-error "'b' appears more than once in 'nontemporal' clauses" } */
17 for (i = 0; i < N; ++i)
18 a[i] += b[i] + c[i];
19 }