forked from OSchip/llvm-project
[OPENMP] Fix handling of implicit mapping of array sections.
llvm-svn: 314220
This commit is contained in:
parent
b4f6c0eca2
commit
5ec3893b3a
|
@ -1972,9 +1972,8 @@ public:
|
|||
OMPClauseMappableExprCommon::MappableExprComponentListRef
|
||||
StackComponents,
|
||||
OpenMPClauseKind) {
|
||||
if (CurComponents.size() < StackComponents.size())
|
||||
return false;
|
||||
auto CCI = CurComponents.rbegin();
|
||||
auto CCE = CurComponents.rend();
|
||||
for (const auto &SC : llvm::reverse(StackComponents)) {
|
||||
// Do both expressions have the same kind?
|
||||
if (CCI->getAssociatedExpression()->getStmtClass() !=
|
||||
|
@ -1992,6 +1991,8 @@ public:
|
|||
if (SCD != CCD)
|
||||
return false;
|
||||
std::advance(CCI, 1);
|
||||
if (CCI == CCE)
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
})) {
|
||||
|
|
|
@ -592,6 +592,8 @@ int main(int argc, char **argv) {
|
|||
#pragma omp target map(s.p->p->p->a)
|
||||
// expected-error@+1 {{variable already marked as mapped in current construct}}
|
||||
{ s.a++; }
|
||||
#pragma omp target map(s.s.s.b[:2])
|
||||
{ s.s.s.b[0]++; }
|
||||
|
||||
return tmain<int, 3>(argc)+tmain<from, 4>(argc); // expected-note {{in instantiation of function template specialization 'tmain<int, 3>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<int, 4>' requested here}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue