diff options
Diffstat (limited to 'clang/test/SemaOpenACC/compute-construct-private-clause.cpp')
| -rw-r--r-- | clang/test/SemaOpenACC/compute-construct-private-clause.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaOpenACC/compute-construct-private-clause.cpp b/clang/test/SemaOpenACC/compute-construct-private-clause.cpp index fb9e89a21acc..88f0a684730c 100644 --- a/clang/test/SemaOpenACC/compute-construct-private-clause.cpp +++ b/clang/test/SemaOpenACC/compute-construct-private-clause.cpp @@ -158,3 +158,17 @@ void Inst() { TemplUses(i, Arr, C); // #TEMPL_USES_INST NTTP<5, NTTP_REFed>(); // #NTTP_INST } + +template<typename T> +void ThisCrashed(unsigned A, unsigned B) { + T ***ThreePtr; + // expected-error@+1 2{{OpenACC sub-array length is unspecified and cannot be inferred because the subscripted value is not an array}} +#pragma acc parallel private(ThreePtr[A:B][B][B]) + ; +} + +void inst_crash() { + // expected-note@+1{{in instantiation}} + ThisCrashed<int>(1, 2); +} + |
