Skip to content

Commit 63635c1

Browse files
[clang] [OpenMP] New OpenMP 6.0 self_maps clause (#129888)
Initial parsing/sema support for self maps in map and requirement clause [Sections 7.9.6 and 10.5.1.6 in OpenMP 6.0 spec]
1 parent 4d17ae7 commit 63635c1

25 files changed

+213
-8
lines changed

clang/docs/OpenMPSupport.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ implementation.
408408
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
409409
| Private reductions | :none:`unclaimed` | :none:`unclaimed` | |
410410
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
411-
| Self maps | :none:`unclaimed` | :none:`unclaimed` | |
411+
| Self maps | :part:`partial` | :none:`unclaimed` | parsing/sema done: https://github.com/llvm/llvm-project/pull/129888 |
412412
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
413413
| Release map type for declare mapper | :none:`unclaimed` | :none:`unclaimed` | |
414414
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ Python Binding Changes
458458
OpenMP Support
459459
--------------
460460
- Added support 'no_openmp_constructs' assumption clause.
461+
- Added support for 'self_maps' in map and requirement clause.
461462
- Added support for 'omp stripe' directive.
462463

463464
Improvements

clang/include/clang/AST/OpenMPClause.h

+45-1
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,49 @@ class OMPAtomicDefaultMemOrderClause final : public OMPClause {
16561656
}
16571657
};
16581658

1659+
/// This represents 'self_maps' clause in the '#pragma omp requires'
1660+
/// directive.
1661+
///
1662+
/// \code
1663+
/// #pragma omp requires self_maps
1664+
/// \endcode
1665+
/// In this example directive '#pragma omp requires' has 'self_maps'
1666+
/// clause.
1667+
class OMPSelfMapsClause final : public OMPClause {
1668+
public:
1669+
friend class OMPClauseReader;
1670+
/// Build 'self_maps' clause.
1671+
///
1672+
/// \param StartLoc Starting location of the clause.
1673+
/// \param EndLoc Ending location of the clause.
1674+
OMPSelfMapsClause(SourceLocation StartLoc, SourceLocation EndLoc)
1675+
: OMPClause(llvm::omp::OMPC_self_maps, StartLoc, EndLoc) {}
1676+
1677+
/// Build an empty clause.
1678+
OMPSelfMapsClause()
1679+
: OMPClause(llvm::omp::OMPC_self_maps, SourceLocation(),
1680+
SourceLocation()) {}
1681+
1682+
child_range children() {
1683+
return child_range(child_iterator(), child_iterator());
1684+
}
1685+
1686+
const_child_range children() const {
1687+
return const_child_range(const_child_iterator(), const_child_iterator());
1688+
}
1689+
1690+
child_range used_children() {
1691+
return child_range(child_iterator(), child_iterator());
1692+
}
1693+
const_child_range used_children() const {
1694+
return const_child_range(const_child_iterator(), const_child_iterator());
1695+
}
1696+
1697+
static bool classof(const OMPClause *T) {
1698+
return T->getClauseKind() == llvm::omp::OMPC_self_maps;
1699+
}
1700+
};
1701+
16591702
/// This represents 'at' clause in the '#pragma omp error' directive
16601703
///
16611704
/// \code
@@ -6349,7 +6392,8 @@ class OMPMapClause final : public OMPMappableExprListClause<OMPMapClause>,
63496392
OpenMPMapModifierKind MapTypeModifiers[NumberOfOMPMapClauseModifiers] = {
63506393
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
63516394
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
6352-
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown};
6395+
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
6396+
OMPC_MAP_MODIFIER_unknown};
63536397

63546398
/// Location of map-type-modifiers for the 'map' clause.
63556399
SourceLocation MapTypeModifiersLoc[NumberOfOMPMapClauseModifiers];

clang/include/clang/AST/RecursiveASTVisitor.h

+5
Original file line numberDiff line numberDiff line change
@@ -3443,6 +3443,11 @@ bool RecursiveASTVisitor<Derived>::VisitOMPAtomicDefaultMemOrderClause(
34433443
return true;
34443444
}
34453445

3446+
template <typename Derived>
3447+
bool RecursiveASTVisitor<Derived>::VisitOMPSelfMapsClause(OMPSelfMapsClause *) {
3448+
return true;
3449+
}
3450+
34463451
template <typename Derived>
34473452
bool RecursiveASTVisitor<Derived>::VisitOMPAtClause(OMPAtClause *) {
34483453
return true;

clang/include/clang/Basic/DiagnosticParseKinds.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ def note_previous_map_type_specified_here
14951495
: Note<"map type '%0' is previous specified here">;
14961496
def err_omp_unknown_map_type_modifier : Error<
14971497
"incorrect map type modifier, expected one of: 'always', 'close', 'mapper'"
1498-
"%select{|, 'present'|, 'present', 'iterator'}0%select{|, 'ompx_hold'}1">;
1498+
"%select{|, 'present'|, 'present', 'iterator'}0%select{|, 'ompx_hold'}1%select{|, 'self'}2">;
14991499
def err_omp_map_type_missing : Error<
15001500
"missing map type">;
15011501
def err_omp_map_type_modifier_missing : Error<

clang/include/clang/Basic/OpenMPKinds.def

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ OPENMP_MAP_MODIFIER_KIND(close)
172172
OPENMP_MAP_MODIFIER_KIND(mapper)
173173
OPENMP_MAP_MODIFIER_KIND(iterator)
174174
OPENMP_MAP_MODIFIER_KIND(present)
175+
OPENMP_MAP_MODIFIER_KIND(self)
175176
// This is an OpenMP extension for the sake of OpenACC support.
176177
OPENMP_MAP_MODIFIER_KIND(ompx_hold)
177178

clang/include/clang/Sema/SemaOpenMP.h

+4
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,10 @@ class SemaOpenMP : public SemaBase {
11121112
OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc,
11131113
SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
11141114

1115+
/// Called on well-formed 'self_maps' clause.
1116+
OMPClause *ActOnOpenMPSelfMapsClause(SourceLocation StartLoc,
1117+
SourceLocation EndLoc);
1118+
11151119
/// Called on well-formed 'at' clause.
11161120
OMPClause *ActOnOpenMPAtClause(OpenMPAtClauseKind Kind,
11171121
SourceLocation KindLoc,

clang/lib/AST/OpenMPClause.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ const OMPClauseWithPreInit *OMPClauseWithPreInit::get(const OMPClause *C) {
155155
case OMPC_reverse_offload:
156156
case OMPC_dynamic_allocators:
157157
case OMPC_atomic_default_mem_order:
158+
case OMPC_self_maps:
158159
case OMPC_at:
159160
case OMPC_severity:
160161
case OMPC_message:
@@ -259,6 +260,7 @@ const OMPClauseWithPostUpdate *OMPClauseWithPostUpdate::get(const OMPClause *C)
259260
case OMPC_reverse_offload:
260261
case OMPC_dynamic_allocators:
261262
case OMPC_atomic_default_mem_order:
263+
case OMPC_self_maps:
262264
case OMPC_at:
263265
case OMPC_severity:
264266
case OMPC_message:
@@ -1941,6 +1943,10 @@ void OMPClausePrinter::VisitOMPAtomicDefaultMemOrderClause(
19411943
<< ")";
19421944
}
19431945

1946+
void OMPClausePrinter::VisitOMPSelfMapsClause(OMPSelfMapsClause *) {
1947+
OS << "self_maps";
1948+
}
1949+
19441950
void OMPClausePrinter::VisitOMPAtClause(OMPAtClause *Node) {
19451951
OS << "at(" << getOpenMPSimpleClauseTypeName(OMPC_at, Node->getAtKind())
19461952
<< ")";

clang/lib/AST/StmtProfile.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,8 @@ void OMPClauseProfiler::VisitOMPDynamicAllocatorsClause(
557557
void OMPClauseProfiler::VisitOMPAtomicDefaultMemOrderClause(
558558
const OMPAtomicDefaultMemOrderClause *C) {}
559559

560+
void OMPClauseProfiler::VisitOMPSelfMapsClause(const OMPSelfMapsClause *C) {}
561+
560562
void OMPClauseProfiler::VisitOMPAtClause(const OMPAtClause *C) {}
561563

562564
void OMPClauseProfiler::VisitOMPSeverityClause(const OMPSeverityClause *C) {}

clang/lib/Basic/OpenMPKinds.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
235235
case OMPC_unified_shared_memory:
236236
case OMPC_reverse_offload:
237237
case OMPC_dynamic_allocators:
238+
case OMPC_self_maps:
238239
case OMPC_match:
239240
case OMPC_nontemporal:
240241
case OMPC_destroy:
@@ -569,6 +570,7 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
569570
case OMPC_unified_shared_memory:
570571
case OMPC_reverse_offload:
571572
case OMPC_dynamic_allocators:
573+
case OMPC_self_maps:
572574
case OMPC_match:
573575
case OMPC_nontemporal:
574576
case OMPC_destroy:

clang/lib/Parse/ParseOpenMP.cpp

+31-2
Original file line numberDiff line numberDiff line change
@@ -3353,6 +3353,20 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
33533353
ErrorFound = true;
33543354
}
33553355

3356+
Clause = ParseOpenMPClause(CKind, WrongDirective);
3357+
break;
3358+
case OMPC_self_maps:
3359+
// OpenMP [6.0, self_maps clause]
3360+
if (getLangOpts().OpenMP < 60) {
3361+
Diag(Tok, diag::err_omp_expected_clause)
3362+
<< getOpenMPDirectiveName(OMPD_requires);
3363+
ErrorFound = true;
3364+
}
3365+
if (!FirstClause) {
3366+
Diag(Tok, diag::err_omp_more_one_clause)
3367+
<< getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0;
3368+
ErrorFound = true;
3369+
}
33563370
Clause = ParseOpenMPClause(CKind, WrongDirective);
33573371
break;
33583372
case OMPC_update:
@@ -4333,6 +4347,20 @@ bool Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy &Data) {
43334347
<< PreMapName;
43344348
}
43354349
ConsumeToken();
4350+
} else if (TypeModifier == OMPC_MAP_MODIFIER_self) {
4351+
Data.MapTypeModifiers.push_back(TypeModifier);
4352+
Data.MapTypeModifiersLoc.push_back(Tok.getLocation());
4353+
if (PP.LookAhead(0).isNot(tok::comma) &&
4354+
PP.LookAhead(0).isNot(tok::colon))
4355+
Diag(Tok.getLocation(), diag::err_omp_missing_comma)
4356+
<< "map type modifier";
4357+
if (getLangOpts().OpenMP < 60)
4358+
Diag(Tok, diag::err_omp_unknown_map_type_modifier)
4359+
<< (getLangOpts().OpenMP >= 51
4360+
? (getLangOpts().OpenMP >= 52 ? 2 : 1)
4361+
: 0)
4362+
<< getLangOpts().OpenMPExtensions << 0;
4363+
ConsumeToken();
43364364
} else {
43374365
// For the case of unknown map-type-modifier or a map-type.
43384366
// Map-type is followed by a colon; the function returns when it
@@ -4354,7 +4382,8 @@ bool Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy &Data) {
43544382
Diag(Tok, diag::err_omp_unknown_map_type_modifier)
43554383
<< (getLangOpts().OpenMP >= 51 ? (getLangOpts().OpenMP >= 52 ? 2 : 1)
43564384
: 0)
4357-
<< getLangOpts().OpenMPExtensions;
4385+
<< getLangOpts().OpenMPExtensions
4386+
<< (getLangOpts().OpenMP >= 60 ? 1 : 0);
43584387
ConsumeToken();
43594388
}
43604389
if (getCurToken().is(tok::comma))
@@ -4829,7 +4858,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
48294858
if (getLangOpts().OpenMP < 52) {
48304859
Diag(Tok, diag::err_omp_unknown_map_type_modifier)
48314860
<< (getLangOpts().OpenMP >= 51 ? 1 : 0)
4832-
<< getLangOpts().OpenMPExtensions;
4861+
<< getLangOpts().OpenMPExtensions << 0;
48334862
InvalidIterator = true;
48344863
}
48354864
}

clang/lib/Sema/SemaOpenMP.cpp

+15-1
Original file line numberDiff line numberDiff line change
@@ -6626,6 +6626,7 @@ StmtResult SemaOpenMP::ActOnOpenMPExecutableDirective(
66266626
case OMPC_reverse_offload:
66276627
case OMPC_dynamic_allocators:
66286628
case OMPC_atomic_default_mem_order:
6629+
case OMPC_self_maps:
66296630
case OMPC_device_type:
66306631
case OMPC_match:
66316632
case OMPC_when:
@@ -15537,6 +15538,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind,
1553715538
case OMPC_reverse_offload:
1553815539
case OMPC_dynamic_allocators:
1553915540
case OMPC_atomic_default_mem_order:
15541+
case OMPC_self_maps:
1554015542
case OMPC_device_type:
1554115543
case OMPC_match:
1554215544
case OMPC_nontemporal:
@@ -16192,6 +16194,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPSimpleClause(
1619216194
case OMPC_unified_shared_memory:
1619316195
case OMPC_reverse_offload:
1619416196
case OMPC_dynamic_allocators:
16197+
case OMPC_self_maps:
1619516198
case OMPC_device_type:
1619616199
case OMPC_match:
1619716200
case OMPC_nontemporal:
@@ -16664,6 +16667,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPSingleExprWithArgClause(
1666416667
case OMPC_reverse_offload:
1666516668
case OMPC_dynamic_allocators:
1666616669
case OMPC_atomic_default_mem_order:
16670+
case OMPC_self_maps:
1666716671
case OMPC_device_type:
1666816672
case OMPC_match:
1666916673
case OMPC_nontemporal:
@@ -16871,6 +16875,9 @@ OMPClause *SemaOpenMP::ActOnOpenMPClause(OpenMPClauseKind Kind,
1687116875
case OMPC_dynamic_allocators:
1687216876
Res = ActOnOpenMPDynamicAllocatorsClause(StartLoc, EndLoc);
1687316877
break;
16878+
case OMPC_self_maps:
16879+
Res = ActOnOpenMPSelfMapsClause(StartLoc, EndLoc);
16880+
break;
1687416881
case OMPC_destroy:
1687516882
Res = ActOnOpenMPDestroyClause(/*InteropVar=*/nullptr, StartLoc,
1687616883
/*LParenLoc=*/SourceLocation(),
@@ -17081,6 +17088,11 @@ SemaOpenMP::ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc,
1708117088
return new (getASTContext()) OMPDynamicAllocatorsClause(StartLoc, EndLoc);
1708217089
}
1708317090

17091+
OMPClause *SemaOpenMP::ActOnOpenMPSelfMapsClause(SourceLocation StartLoc,
17092+
SourceLocation EndLoc) {
17093+
return new (getASTContext()) OMPSelfMapsClause(StartLoc, EndLoc);
17094+
}
17095+
1708417096
StmtResult
1708517097
SemaOpenMP::ActOnOpenMPInteropDirective(ArrayRef<OMPClause *> Clauses,
1708617098
SourceLocation StartLoc,
@@ -17553,6 +17565,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPVarListClause(OpenMPClauseKind Kind,
1755317565
case OMPC_reverse_offload:
1755417566
case OMPC_dynamic_allocators:
1755517567
case OMPC_atomic_default_mem_order:
17568+
case OMPC_self_maps:
1755617569
case OMPC_device_type:
1755717570
case OMPC_match:
1755817571
case OMPC_order:
@@ -21961,7 +21974,8 @@ OMPClause *SemaOpenMP::ActOnOpenMPMapClause(
2196121974
OpenMPMapModifierKind Modifiers[] = {
2196221975
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
2196321976
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
21964-
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown};
21977+
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
21978+
OMPC_MAP_MODIFIER_unknown};
2196521979
SourceLocation ModifiersLoc[NumberOfOMPMapClauseModifiers];
2196621980

2196721981
if (IteratorModifier && !IteratorModifier->getType()->isSpecificBuiltinType(

clang/lib/Sema/TreeTransform.h

+6
Original file line numberDiff line numberDiff line change
@@ -10835,6 +10835,12 @@ OMPClause *TreeTransform<Derived>::TransformOMPAtomicDefaultMemOrderClause(
1083510835
"atomic_default_mem_order clause cannot appear in dependent context");
1083610836
}
1083710837

10838+
template <typename Derived>
10839+
OMPClause *
10840+
TreeTransform<Derived>::TransformOMPSelfMapsClause(OMPSelfMapsClause *C) {
10841+
llvm_unreachable("self_maps clause cannot appear in dependent context");
10842+
}
10843+
1083810844
template <typename Derived>
1083910845
OMPClause *TreeTransform<Derived>::TransformOMPAtClause(OMPAtClause *C) {
1084010846
return getDerived().RebuildOMPAtClause(C->getAtKind(), C->getAtKindKwLoc(),

clang/lib/Serialization/ASTReader.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -11094,6 +11094,9 @@ OMPClause *OMPClauseReader::readClause() {
1109411094
case llvm::omp::OMPC_atomic_default_mem_order:
1109511095
C = new (Context) OMPAtomicDefaultMemOrderClause();
1109611096
break;
11097+
case llvm::omp::OMPC_self_maps:
11098+
C = new (Context) OMPSelfMapsClause();
11099+
break;
1109711100
case llvm::omp::OMPC_at:
1109811101
C = new (Context) OMPAtClause();
1109911102
break;
@@ -11575,6 +11578,8 @@ void OMPClauseReader::VisitOMPAtomicDefaultMemOrderClause(
1157511578
C->setAtomicDefaultMemOrderKindKwLoc(Record.readSourceLocation());
1157611579
}
1157711580

11581+
void OMPClauseReader::VisitOMPSelfMapsClause(OMPSelfMapsClause *) {}
11582+
1157811583
void OMPClauseReader::VisitOMPAtClause(OMPAtClause *C) {
1157911584
C->setAtKind(static_cast<OpenMPAtClauseKind>(Record.readInt()));
1158011585
C->setLParenLoc(Record.readSourceLocation());

clang/lib/Serialization/ASTWriter.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -8430,6 +8430,8 @@ void OMPClauseWriter::VisitOMPAtomicDefaultMemOrderClause(
84308430
Record.AddSourceLocation(C->getAtomicDefaultMemOrderKindKwLoc());
84318431
}
84328432

8433+
void OMPClauseWriter::VisitOMPSelfMapsClause(OMPSelfMapsClause *) {}
8434+
84338435
void OMPClauseWriter::VisitOMPAtClause(OMPAtClause *C) {
84348436
Record.push_back(C->getAtKind());
84358437
Record.AddSourceLocation(C->getLParenLoc());

clang/test/OpenMP/requires_ast_print.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=99 -DOMP99 -ast-print %s | FileCheck --check-prefixes=CHECK,REV %s
1414
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=99 -DOMP99 -x c++ -std=c++11 -emit-pch -o %t %s
1515
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=99 -DOMP99 -std=c++11 -include-pch %t -verify %s -ast-print | FileCheck --check-prefixes=CHECK,REV %s
16+
17+
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=60 -DOMP60 -ast-print %s | FileCheck --check-prefixes=CHECK,CHECK_SELF %s
18+
// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -DOMP60 -x c++ -std=c++11 -emit-pch -o %t %s
19+
// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -DOMP60 -std=c++11 -include-pch %t -verify %s -ast-print | FileCheck --check-prefixes=CHECK,CHECK_SELF %s
1620
// expected-no-diagnostics
1721

1822
#ifndef HEADER
@@ -24,6 +28,11 @@
2428
#pragma omp requires unified_shared_memory
2529
// CHECK:#pragma omp requires unified_shared_memory
2630

31+
#ifdef OMP60
32+
#pragma omp requires self_maps
33+
// CHECK_SELF:#pragma omp requires self_maps
34+
#endif
35+
2736
#ifdef OMP99
2837
#pragma omp requires reverse_offload
2938
// REV:#pragma omp requires reverse_offload

clang/test/OpenMP/requires_messages.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
22
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=99 -DOMP99 -verify=expected,rev -ferror-limit 100 %s -Wuninitialized
3+
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=60 -DOMP60 -verify=self -ferror-limit 100 %s -Wuninitialized
34

45
int a;
56
#pragma omp requires unified_address allocate(a) // rev-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note{{unified_address clause previously used here}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp requires'}}
@@ -22,6 +23,12 @@ int a;
2223

2324
#pragma omp requires dynamic_allocators, dynamic_allocators // expected-error {{only one dynamic_allocators clause can appear on a requires directive in a single translation unit}} expected-error {{directive '#pragma omp requires' cannot contain more than one 'dynamic_allocators' clause}}
2425

26+
#ifdef OMP60
27+
#pragma omp requires self_maps // self-note {{self_maps clause previously used here}}
28+
29+
#pragma omp requires self_maps, self_maps // self-error {{only one self_maps clause can appear on a requires directive in a single translation unit}} self-error {{directive '#pragma omp requires' cannot contain more than one 'self_maps' clause}}
30+
#endif
31+
2532
#pragma omp requires atomic_default_mem_order(seq_cst) // rev-note {{atomic_default_mem_order clause previously used here}} expected-note {{atomic_default_mem_order clause previously used here}} expected-note {{atomic_default_mem_order clause previously used here}} expected-note {{atomic_default_mem_order clause previously used here}} expected-note {{atomic_default_mem_order clause previously used here}}
2633

2734
#pragma omp requires atomic_default_mem_order(acq_rel) // expected-error {{only one atomic_default_mem_order clause can appear on a requires directive in a single translation unit}}

0 commit comments

Comments
 (0)