comparison gcc/testsuite/g++.dg/gomp/simd-2.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 int a[32], b[32];
2
3 void
4 foo (void)
5 {
6 int i, j;
7 #pragma omp simd linear(i, j) collapse(2) // { dg-error "iteration variable 'i' should not be linear" }
8 for (i = 0; i < 32; ++i) // { dg-error "iteration variable 'j' should not be linear" "" { target *-*-* } .-1 }
9 for (j = 0; j < 32; ++j)
10 a[i] += b[j];
11 }
12
13 void
14 bar (void)
15 {
16 static int i, j;
17 #pragma omp for simd linear(i, j) collapse(2) // { dg-error "iteration variable 'i' should not be linear" "" { target *-*-* } .+1 }
18 for (i = 0; i < 32; ++i) // { dg-error "iteration variable 'j' should not be linear" }
19 for (j = 0; j < 32; ++j)
20 a[i] += b[j];
21 }