File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1688,8 +1688,10 @@ static void CheckCoReduce(
1688
1688
characteristics::FunctionResult::Attr::Allocatable,
1689
1689
characteristics::FunctionResult::Attr::Pointer,
1690
1690
};
1691
- const auto *result{
1692
- procChars ? procChars->functionResult ->GetTypeAndShape () : nullptr };
1691
+ const characteristics::TypeAndShape *result{
1692
+ procChars && procChars->functionResult
1693
+ ? procChars->functionResult ->GetTypeAndShape ()
1694
+ : nullptr };
1693
1695
if (!procChars || !procChars->IsPure () ||
1694
1696
procChars->dummyArguments .size () != 2 || !procChars->functionResult ) {
1695
1697
messages.Say (
Original file line number Diff line number Diff line change
1
+ ! RUN: %python %S/test_errors.py %s %flang_fc1
2
+ external ext
3
+ integer caf[* ]
4
+ ! ERROR: OPERATION= argument of CO_REDUCE() must be a pure function of two data arguments
5
+ call co_reduce(caf, ext)
6
+ end
You can’t perform that action at this time.
0 commit comments