forked from OSchip/llvm-project
Revert "[OPENMP]Fix PR41768: check DSA for globals with `default(none)` clauses."
This has introduced (exposed?) a crash in clang sema, that does not happen without this patch. I'll followup in the original bugreport and commit with reproducer. This reverts commit r360061. llvm-svn: 360327
This commit is contained in:
parent
b32a02b5bc
commit
a8f8d3b01e
|
@ -8821,8 +8821,6 @@ def err_omp_threadprivate_incomplete_type : Error<
|
|||
"threadprivate variable with incomplete type %0">;
|
||||
def err_omp_no_dsa_for_variable : Error<
|
||||
"variable %0 must have explicitly specified data sharing attributes">;
|
||||
def note_omp_default_dsa_none : Note<
|
||||
"explicit data sharing attribute requested here">;
|
||||
def err_omp_wrong_dsa : Error<
|
||||
"%0 variable cannot be %1">;
|
||||
def err_omp_variably_modified_type_not_supported : Error<
|
||||
|
|
|
@ -1777,15 +1777,10 @@ VarDecl *Sema::isOpenMPCapturedDecl(ValueDecl *D) {
|
|||
DSAStack->getTopDSA(D, DSAStack->isClauseParsingMode());
|
||||
if (DVarPrivate.CKind != OMPC_unknown && isOpenMPPrivate(DVarPrivate.CKind))
|
||||
return VD ? VD : cast<VarDecl>(DVarPrivate.PrivateCopy->getDecl());
|
||||
if (VD && DSAStack->getDefaultDSA() == DSA_none)
|
||||
return VD;
|
||||
DVarPrivate = DSAStack->hasDSA(D, isOpenMPPrivate,
|
||||
[](OpenMPDirectiveKind) { return true; },
|
||||
DSAStack->isClauseParsingMode());
|
||||
// The variable is not private or it is the variable in the directive with
|
||||
// default(none) clause and not used in any clause.
|
||||
if (DVarPrivate.CKind != OMPC_unknown ||
|
||||
(VD && DSAStack->getDefaultDSA() == DSA_none))
|
||||
if (DVarPrivate.CKind != OMPC_unknown)
|
||||
return VD ? VD : cast<VarDecl>(DVarPrivate.PrivateCopy->getDecl());
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -4189,7 +4184,6 @@ StmtResult Sema::ActOnOpenMPExecutableDirective(
|
|||
for (const auto &P : VarsWithInheritedDSA) {
|
||||
Diag(P.second->getExprLoc(), diag::err_omp_no_dsa_for_variable)
|
||||
<< P.first << P.second->getSourceRange();
|
||||
Diag(DSAStack->getDefaultDSALocation(), diag::note_omp_default_dsa_none);
|
||||
}
|
||||
ErrorFound = !VarsWithInheritedDSA.empty() || ErrorFound;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -39,7 +39,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
|
@ -72,7 +72,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -87,7 +87,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ L1:
|
|||
}
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -39,7 +39,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for simd default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
|
@ -72,7 +72,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -87,7 +87,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp distribute parallel for simd default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
|
|
|
@ -18,14 +18,14 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
foo();
|
||||
|
||||
#pragma omp parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel default(shared)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp parallel default(none) // ge40-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel default(none)
|
||||
(void)c; // ge40-error {{variable 'c' must have explicitly specified data sharing attributes}}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel for default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp parallel for default(shared), default(shared) // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'default' clause}}
|
||||
|
@ -25,11 +25,11 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
|
||||
#pragma omp parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel for default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
#pragma omp parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel for default(shared)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
|
|
@ -58,7 +58,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel for default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel for simd default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp parallel for simd default(shared), default(shared) // expected-error {{directive '#pragma omp parallel for simd' cannot contain more than one 'default' clause}}
|
||||
|
@ -25,11 +25,11 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
|
||||
#pragma omp parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel for simd default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
#pragma omp parallel default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel for simd default(shared)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} expected-error {{variable 'i' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
|
|
@ -58,7 +58,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel for simd default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ void foo() {
|
|||
|
||||
#pragma omp parallel // expected-error {{unexpected OpenMP directive '#pragma omp parallel'}}
|
||||
|
||||
int a;
|
||||
struct S;
|
||||
S& bar();
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -55,11 +54,8 @@ int main(int argc, char **argv) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp parallel default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
{
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
++a; // expected-error {{variable 'a' must have explicitly specified data sharing attributes}}
|
||||
}
|
||||
#pragma omp parallel default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
goto L2; // expected-error {{use of undeclared label 'L2'}}
|
||||
#pragma omp parallel
|
||||
|
|
|
@ -25,12 +25,12 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
#pragma omp parallel sections default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel sections default(none)
|
||||
{
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
}
|
||||
|
||||
#pragma omp parallel sections default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel sections default(none)
|
||||
{
|
||||
#pragma omp parallel sections default(shared)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ int main(int argc, char **argv) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp parallel sections default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp parallel sections default(none)
|
||||
{
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ void foo(int x, int n) {
|
|||
for (int iter = 0; iter < x; iter++) {
|
||||
#pragma omp target teams distribute parallel for map( \
|
||||
from \
|
||||
: vec [0:n]) default(none) // expected-note 4 {{explicit data sharing attribute requested here}}
|
||||
: vec [0:n]) default(none)
|
||||
// expected-error@+1 {{variable 'n' must have explicitly specified data sharing attributes}}
|
||||
for (int ii = 0; ii < n; ii++) {
|
||||
// expected-error@+3 {{variable 'iter' must have explicitly specified data sharing attributes}}
|
||||
|
|
|
@ -18,14 +18,14 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target parallel default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
foo();
|
||||
|
||||
#pragma omp target parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp target parallel default(none)
|
||||
foo();
|
||||
#pragma omp target parallel default(shared)
|
||||
++argc;
|
||||
#pragma omp target parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel default(none)
|
||||
#pragma omp parallel default(shared)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
return 0;
|
||||
|
|
|
@ -15,7 +15,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target parallel for default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp target parallel for default(shared), default(shared) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'default' clause}}
|
||||
|
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
|
||||
#pragma omp target parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel for default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp target parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel for default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target parallel for simd default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel for simd default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
#pragma omp target parallel for simd default(shared), default(shared) // expected-error {{directive '#pragma omp target parallel for simd' cannot contain more than one 'default' clause}}
|
||||
|
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
|
||||
#pragma omp target parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel for simd default(none)
|
||||
for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
foo();
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp target parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target parallel for simd default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target teams default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
foo();
|
||||
|
||||
#pragma omp target teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp target teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams default(none)
|
||||
#pragma omp parallel default(shared)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
return 0;
|
||||
|
|
|
@ -18,7 +18,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target teams distribute default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target teams distribute default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams distribute default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -61,7 +61,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp target teams distribute default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams distribute default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target teams distribute parallel for default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target teams distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams distribute parallel for default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -61,7 +61,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp target teams distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams distribute parallel for default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{ariable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target teams distribute parallel for simd default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target teams distribute parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams distribute parallel for simd default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -62,7 +62,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp target teams distribute parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams distribute parallel for simd default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{ariable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -47,14 +47,14 @@ int main(int argc, char **argv) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp target teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp target teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams default(none)
|
||||
#pragma omp parallel num_threads(argc) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
;
|
||||
|
||||
#pragma omp target teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp target teams default(none)
|
||||
{
|
||||
#pragma omp parallel num_threads(argc) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
;
|
||||
|
|
|
@ -13,10 +13,10 @@ int main(int argc, char **argv) {
|
|||
#pragma omp task default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
|
||||
foo();
|
||||
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task default(shared)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
return 0;
|
||||
|
|
|
@ -23,7 +23,7 @@ template <typename T>
|
|||
struct S {
|
||||
T b;
|
||||
S(T a, T c) {
|
||||
#pragma omp task default(none) firstprivate(a, b) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none) firstprivate(a, b)
|
||||
a = b = c; // expected-error {{variable 'c' must have explicitly specified data sharing attributes}}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,10 +38,10 @@ int foo() {
|
|||
#pragma omp task
|
||||
// expected-note@+1 2 {{predetermined as a firstprivate in a task construct here}}
|
||||
++s1;
|
||||
#pragma omp task default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task default(shared)
|
||||
++a; // expected-error 2 {{variable 'a' must have explicitly specified data sharing attributes}}
|
||||
#pragma omp task default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task
|
||||
// expected-error@+1 {{calling a private constructor of class 'S'}}
|
||||
++a; // expected-error 2 {{variable 'a' must have explicitly specified data sharing attributes}}
|
||||
|
@ -167,7 +167,7 @@ L1:
|
|||
break;
|
||||
}
|
||||
}
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
goto L2; // expected-error {{use of undeclared label 'L2'}}
|
||||
|
@ -184,10 +184,10 @@ L2:
|
|||
for (int n = 0; n < 100; ++n) {
|
||||
}
|
||||
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task default(shared)
|
||||
++a; // expected-error {{variable 'a' must have explicitly specified data sharing attributes}}
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task
|
||||
++a; // expected-error {{variable 'a' must have explicitly specified data sharing attributes}}
|
||||
#pragma omp task default(shared)
|
||||
|
@ -201,10 +201,10 @@ L2:
|
|||
#pragma omp task
|
||||
#pragma omp parallel shared(a, b)
|
||||
++a, ++b;
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task default(shared)
|
||||
++sa; // expected-error {{variable 'sa' must have explicitly specified data sharing attributes}}
|
||||
#pragma omp task default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp task default(none)
|
||||
#pragma omp task
|
||||
// expected-error@+1 {{calling a private constructor of class 'S'}}
|
||||
++sa; // expected-error {{variable 'sa' must have explicitly specified data sharing attributes}}
|
||||
|
|
|
@ -25,11 +25,11 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams default(none)
|
||||
#pragma omp parallel default(shared)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
return 0;
|
||||
|
|
|
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
|||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
|||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute parallel for default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -76,7 +76,7 @@ L1:
|
|||
}
|
||||
}
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute parallel for default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{ariable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
|||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute parallel for simd default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -76,7 +76,7 @@ L1:
|
|||
}
|
||||
}
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute parallel for simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute parallel for simd default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{ariable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
|||
for (int i=0; i<200; i++) foo();
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute simd default(none)
|
||||
for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -76,7 +76,7 @@ L1:
|
|||
}
|
||||
}
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute simd default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams distribute simd default(none)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
++argc; // expected-error {{ariable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
#pragma omp target
|
||||
#pragma omp teams default(none) // expected-note {{explicit data sharing attribute requested here}}
|
||||
#pragma omp teams default(none)
|
||||
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
|
||||
|
||||
goto L2; // expected-error {{use of undeclared label 'L2'}}
|
||||
|
|
Loading…
Reference in New Issue