3 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -verify %s
12 for (int j
= 0 ; j
< NNN
; j
++) {
23 #pragma omp loop bind(teams)
24 for (int j
= 0 ; j
< NNN
; j
++) {
28 #pragma omp loop bind(teams) collapse(2) private(var1)
29 for (int i
= 0 ; i
< 3 ; i
++) {
30 for (int j
= 0 ; j
< NNN
; j
++) {
37 void orphan_loop_with_bind() {
38 #pragma omp loop bind(parallel)
39 for (int j
= 0 ; j
< NNN
; j
++) {
44 void orphan_loop_no_bind() {
45 #pragma omp loop // expected-error{{expected 'bind' clause for 'loop' construct without an enclosing OpenMP construct}}
46 for (int j
= 0 ; j
< NNN
; j
++) {
51 void teams_loop_reduction() {
56 #pragma omp loop bind(teams)
57 for (int j
= 0 ; j
< NNN
; j
++) {
61 #pragma omp loop bind(teams) reduction(+:total) // expected-error{{'reduction' clause not allowed with '#pragma omp loop bind(teams)'}}
62 for (int j
= 0 ; j
< NNN
; j
++) {
68 int main(int argc
, char *argv
[]) {
71 orphan_loop_with_bind();
72 orphan_loop_no_bind();
73 teams_loop_reduction();