Skip to content

Commit bd48158

Browse files
committed
Update to be in alphabetical order
1 parent fe9b62a commit bd48158

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

flang/examples/FeatureList/FeatureList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ struct NodeVisitor {
348348
READ_FEATURE(TeamValue)
349349
READ_FEATURE(ImageSelector)
350350
READ_FEATURE(ImageSelectorSpec)
351+
READ_FEATURE(ImageSelectorSpec::Notify)
351352
READ_FEATURE(ImageSelectorSpec::Stat)
352353
READ_FEATURE(ImageSelectorSpec::Team_Number)
353-
READ_FEATURE(ImageSelectorSpec::Notify)
354354
READ_FEATURE(ImplicitPart)
355355
READ_FEATURE(ImplicitPartStmt)
356356
READ_FEATURE(ImplicitSpec)

flang/include/flang/Evaluate/traverse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class Traverse {
146146
return Combine(x.base(), x.subscript());
147147
}
148148
Result operator()(const CoarrayRef &x) const {
149-
return Combine(x.base(), x.cosubscript(), x.stat(), x.team(), x.notify());
149+
return Combine(x.base(), x.cosubscript(), x.notify(), x.stat(), x.team());
150150
}
151151
Result operator()(const DataRef &x) const { return visitor_(x.u); }
152152
Result operator()(const Substring &x) const {

flang/include/flang/Evaluate/variable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ class CoarrayRef {
275275
private:
276276
common::CopyableIndirection<DataRef> base_;
277277
std::vector<Expr<SubscriptInteger>> cosubscript_;
278+
std::optional<common::CopyableIndirection<Expr<SomeType>>> notify_;
278279
std::optional<common::CopyableIndirection<Expr<SomeInteger>>> stat_;
279280
std::optional<common::CopyableIndirection<Expr<SomeType>>> team_;
280-
std::optional<common::CopyableIndirection<Expr<SomeType>>> notify_;
281281
};
282282

283283
// R911 data-ref is defined syntactically as a series of part-refs, which

flang/include/flang/Parser/dump-parse-tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ class ParseTreeDumper {
384384
NODE(parser, TeamValue)
385385
NODE(parser, ImageSelector)
386386
NODE(parser, ImageSelectorSpec)
387+
NODE(ImageSelectorSpec, Notify)
387388
NODE(ImageSelectorSpec, Stat)
388389
NODE(ImageSelectorSpec, Team_Number)
389-
NODE(ImageSelectorSpec, Notify)
390390
NODE(parser, ImplicitPart)
391391
NODE(parser, ImplicitPartStmt)
392392
NODE(parser, ImplicitSpec)

flang/include/flang/Parser/parse-tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ struct ImageSelectorSpec {
16901690
WRAPPER_CLASS(Team_Number, ScalarIntExpr);
16911691
WRAPPER_CLASS(Notify, Scalar<common::Indirection<Variable>>);
16921692
UNION_CLASS_BOILERPLATE(ImageSelectorSpec);
1693-
std::variant<Stat, TeamValue, Team_Number, Notify> u;
1693+
std::variant<Notify, Stat, TeamValue, Team_Number> u;
16941694
};
16951695

16961696
// R924 image-selector ->

flang/lib/Semantics/dump-expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ void DumpEvaluateExpr::Show(const evaluate::CoarrayRef &x) {
2323
Indent("coarray ref");
2424
Show(x.base());
2525
Show(x.cosubscript());
26+
Show(x.notify());
2627
Show(x.stat());
2728
Show(x.team());
28-
Show(x.notify());
2929
Outdent();
3030
}
3131

flang/lib/Semantics/expression.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,19 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::CoindexedNamedObject &x) {
15791579
std::get<std::list<parser::ImageSelectorSpec>>(x.imageSelector.t)) {
15801580
common::visit(
15811581
common::visitors{
1582+
[&](const parser::ImageSelectorSpec::Notify &x) {
1583+
Analyze(x.v);
1584+
if (const auto *expr{GetExpr(context_, x.v)}) {
1585+
if (coarrayRef.notify()) {
1586+
Say("coindexed reference has multiple NOTIFY= specifiers"_err_en_US);
1587+
} else if (auto dyType{expr->GetType()};
1588+
dyType && IsNotifyType(GetDerivedTypeSpec(*dyType))) {
1589+
coarrayRef.set_notify(Expr<SomeType>{*expr});
1590+
} else {
1591+
Say("NOTIFY= specifier must have type NOTIFY_TYPE from ISO_FORTRAN_ENV"_err_en_US);
1592+
}
1593+
}
1594+
},
15821595
[&](const parser::ImageSelectorSpec::Stat &x) {
15831596
Analyze(x.v);
15841597
if (const auto *expr{GetExpr(context_, x.v)}) {
@@ -1614,19 +1627,6 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::CoindexedNamedObject &x) {
16141627
coarrayRef.set_team(Expr<SomeType>{*expr});
16151628
}
16161629
}
1617-
},
1618-
[&](const parser::ImageSelectorSpec::Notify &x) {
1619-
Analyze(x.v);
1620-
if (const auto *expr{GetExpr(context_, x.v)}) {
1621-
if (coarrayRef.notify()) {
1622-
Say("coindexed reference has multiple NOTIFY= specifiers"_err_en_US);
1623-
} else if (auto dyType{expr->GetType()};
1624-
dyType && IsNotifyType(GetDerivedTypeSpec(*dyType))) {
1625-
coarrayRef.set_notify(Expr<SomeType>{*expr});
1626-
} else {
1627-
Say("NOTIFY= specifier must have type NOTIFY_TYPE from ISO_FORTRAN_ENV"_err_en_US);
1628-
}
1629-
}
16301630
}},
16311631
imageSelSpec.u);
16321632
}

0 commit comments

Comments
 (0)