1*532dc62bSNikita Popov // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -triple x86_64-unknown-linux-gnu \
2bfc8f9e9SAlexey Bataev // RUN:   -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
3bfc8f9e9SAlexey Bataev 
4bfc8f9e9SAlexey Bataev // expected-no-diagnostics
5bfc8f9e9SAlexey Bataev 
6bfc8f9e9SAlexey Bataev int x[100];
7bfc8f9e9SAlexey Bataev int y[100];
8bfc8f9e9SAlexey Bataev 
9bfc8f9e9SAlexey Bataev // CHECK-LABEL: @many_iterators_single_clause(
10bfc8f9e9SAlexey Bataev // CHECK:    [[VLA:%.*]] = alloca [[STRUCT_KMP_DEPEND_INFO:%.*]], i64 10, align 16
11bfc8f9e9SAlexey Bataev // CHECK:    = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* {{.*}}, i32 {{.*}}, i8* {{.*}}, i32 10, i8* {{.*}}, i32 0, i8* null)
many_iterators_single_clause(void)12e9e55acdSAaron Ballman void many_iterators_single_clause(void) {
13bfc8f9e9SAlexey Bataev     #pragma omp task depend(iterator(j=0:5), in: x[j], y[j])
14bfc8f9e9SAlexey Bataev     {
15bfc8f9e9SAlexey Bataev     }
16bfc8f9e9SAlexey Bataev }
17bfc8f9e9SAlexey Bataev 
18bfc8f9e9SAlexey Bataev // CHECK-LABEL: @many_iterators_many_clauses(
19bfc8f9e9SAlexey Bataev // CHECK:    [[VLA:%.*]] = alloca [[STRUCT_KMP_DEPEND_INFO:%.*]], i64 10, align 16
20bfc8f9e9SAlexey Bataev // CHECK:    = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* {{.*}}, i32 {{.*}}, i8* {{.*}}, i32 10, i8* {{.*}}, i32 0, i8* null)
many_iterators_many_clauses(void)21e9e55acdSAaron Ballman void many_iterators_many_clauses(void) {
22bfc8f9e9SAlexey Bataev     #pragma omp task depend(iterator(j=0:5), in: x[j]) \
23bfc8f9e9SAlexey Bataev                      depend(iterator(j=0:5), in: y[j])
24bfc8f9e9SAlexey Bataev     {
25bfc8f9e9SAlexey Bataev     }
26bfc8f9e9SAlexey Bataev }
27