Skip to content

Commit 58aea76

Browse files
committed
Update init/shutdown tests now that we agree it should only have device_num 1x
1 parent 21a295a commit 58aea76

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clang/test/SemaOpenACC/init-construct.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ void TestInst() {
4242
#pragma acc init
4343
#pragma acc init if (T::value < T{})
4444
#pragma acc init device_type(radeon) device_num(getI()) if (getI() < getS())
45+
// expected-error@+2{{OpenACC 'device_num' clause cannot appear more than once on a 'init' directive}}
46+
// expected-note@+1{{previous clause is here}}
4547
#pragma acc init device_type(multicore) device_type(host) device_num(t) if (t < T::value) device_num(getI())
4648

4749
// expected-error@+2{{OpenACC 'if' clause cannot appear more than once on a 'init' directive}}

clang/test/SemaOpenACC/shutdown-construct.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ void TestInst() {
4242
#pragma acc shutdown
4343
#pragma acc shutdown if (T::value < T{})
4444
#pragma acc shutdown device_type(multicore) device_num(getI()) if (getI() < getS())
45+
// expected-error@+2{{OpenACC 'device_num' clause cannot appear more than once on a 'shutdown' directive}}
46+
// expected-note@+1{{previous clause is here}}
4547
#pragma acc shutdown device_type(default) device_type(radeon) device_num(t) if (t < T::value) device_num(getI())
4648

4749
// expected-error@+1{{value of type 'const NotConvertible' is not contextually convertible to 'bool'}}

0 commit comments

Comments
 (0)