| 1 |
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux-gnu \ |
| 2 |
// RUN: -emit-llvm %s -o - | FileCheck %s |
| 3 |
|
| 4 |
// expected-no-diagnostics |
| 5 |
|
| 6 |
extern int bounds1(int); |
| 7 |
extern int bounds2(int); |
| 8 |
|
| 9 |
extern void fun2(int n, int *a, int *b); |
| 10 |
extern void fun3(int n, int *a, int *b); |
| 11 |
|
| 12 |
void fun1(int n, int *a, int *b) |
| 13 |
{ |
| 14 |
#pragma omp task depend(iterator(j = 0 : bounds1(n)), in : a[b[j]]) |
| 15 |
{ |
| 16 |
fun2(n, a, b); |
| 17 |
} |
| 18 |
// CHECK: alloca %struct.kmp_depend_info, i64 [[FIRST_VLA:%.*]], align 16 |
| 19 |
|
| 20 |
#pragma omp task depend(iterator(j = 0 : bounds2(n)), in : a[b[j]]) |
| 21 |
{ |
| 22 |
fun3(n, a, b); |
| 23 |
} |
| 24 |
// CHECK-NOT: alloca %struct.kmp_depend_info, i64 [[FIRST_VLA]], align 16 |
| 25 |
} |