diff options
| author | Kelvin Li <kkwli0@gmail.com> | 2019-02-05 16:43:00 +0000 |
|---|---|---|
| committer | Kelvin Li <kkwli0@gmail.com> | 2019-02-05 16:43:00 +0000 |
| commit | 620ba6035ee74ac897e40d6629fe794984e0e5f7 (patch) | |
| tree | b18ce285ef544e8c8b8535ef19d0f7d6532b94f1 /clang/test | |
| parent | a3ec627a1c60ead93207cbd147b6faaf028231bd (diff) | |
| download | bcm5719-llvm-620ba6035ee74ac897e40d6629fe794984e0e5f7.tar.gz bcm5719-llvm-620ba6035ee74ac897e40d6629fe794984e0e5f7.zip | |
[OPENMP] issue error messages for multiple teams contructs in a target construct
The fix is to issue error messages if there are more than one
teams construct inside a target constructs.
#pragma omp target
{
#pragma omp teams
{ ... }
#pragma omp teams
{ ... }
}
llvm-svn: 353186
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/OpenMP/nesting_of_regions.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/OpenMP/nesting_of_regions.cpp b/clang/test/OpenMP/nesting_of_regions.cpp index 0955ee21556..fc9230c6870 100644 --- a/clang/test/OpenMP/nesting_of_regions.cpp +++ b/clang/test/OpenMP/nesting_of_regions.cpp @@ -4080,6 +4080,13 @@ void foo() { } #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} { +#pragma omp teams // expected-note {{directive outside teams construct here}} + ++a; +#pragma omp teams // expected-note {{nested teams construct here}} + ++a; + } +#pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} + { ++a; // expected-note {{statement outside teams construct here}} #pragma omp teams // expected-note {{nested teams construct here}} ++a; @@ -12693,6 +12700,13 @@ void foo() { } #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} { +#pragma omp teams // expected-note {{directive outside teams construct here}} + ++a; +#pragma omp teams // expected-note {{nested teams construct here}} + ++a; + } +#pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} + { ++a; // expected-note {{statement outside teams construct here}} #pragma omp teams // expected-note {{nested teams construct here}} ++a; |

