aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaOpenACC/data-construct-use_device-clause.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaOpenACC/data-construct-use_device-clause.c')
-rw-r--r--clang/test/SemaOpenACC/data-construct-use_device-clause.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaOpenACC/data-construct-use_device-clause.c b/clang/test/SemaOpenACC/data-construct-use_device-clause.c
index 9239757..65eaf4e 100644
--- a/clang/test/SemaOpenACC/data-construct-use_device-clause.c
+++ b/clang/test/SemaOpenACC/data-construct-use_device-clause.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fopenacc -verify
+// RUN: %clang_cc1 %s -fopenacc -verify -Wopenacc-extension
typedef struct IsComplete {
struct S { int A; } CompositeMember;
@@ -23,7 +23,7 @@ void uses(int IntParam, short *PointerParam, float ArrayParam[5], Complete Compo
#pragma acc host_data use_device(LocalComposite.ScalarMember, LocalComposite.ScalarMember)
;
- // expected-error@+1{{OpenACC variable in 'use_device' clause is not a valid variable name or array name}}
+ // expected-warning@+1{{sub-array as a variable in 'use_device' clause is not a valid variable name or array name}}
#pragma acc host_data use_device(LocalArray[2:1])
// expected-error@+1{{OpenACC variable in 'use_device' clause is not a valid variable name or array name}}
@@ -35,12 +35,12 @@ void uses(int IntParam, short *PointerParam, float ArrayParam[5], Complete Compo
;
// expected-error@+2{{OpenACC sub-array length is unspecified and cannot be inferred because the subscripted value is not an array}}
- // expected-error@+1{{OpenACC variable in 'use_device' clause is not a valid variable name or array name}}
+ // expected-warning@+1{{sub-array as a variable in 'use_device' clause is not a valid variable name or array name}}
#pragma acc host_data use_device(PointerParam[2:])
;
// expected-error@+2{{OpenACC sub-array specified range [2:5] would be out of the range of the subscripted array size of 5}}
- // expected-error@+1{{OpenACC variable in 'use_device' clause is not a valid variable name or array name}}
+ // expected-warning@+1{{sub-array as a variable in 'use_device' clause is not a valid variable name or array name}}
#pragma acc host_data use_device(ArrayParam[2:5])
;