Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions flang/lib/Semantics/pointer-assignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,18 @@ bool PointerAssignmentChecker::Check(const evaluate::FunctionRef<T> &f) {
std::optional<MessageFixedText> msg;
const auto &funcResult{proc->functionResult}; // C1025
if (!funcResult) {
msg = "%s is associated with the non-existent result of reference to"
" procedure"_err_en_US;
msg =
"%s is associated with the non-existent result of reference to procedure"_err_en_US;
} else if (CharacterizeProcedure()) {
// Shouldn't be here in this function unless lhs is an object pointer.
msg = "Procedure %s is associated with the result of a reference to"
" function '%s' that does not return a procedure pointer"_err_en_US;
msg =
"Procedure %s is associated with the result of a reference to function '%s' that does not return a procedure pointer"_err_en_US;
} else if (funcResult->IsProcedurePointer()) {
msg = "Object %s is associated with the result of a reference to"
" function '%s' that is a procedure pointer"_err_en_US;
msg =
"Object %s is associated with the result of a reference to function '%s' that is a procedure pointer"_err_en_US;
} else if (!funcResult->attrs.test(FunctionResult::Attr::Pointer)) {
msg = "%s is associated with the result of a reference to function '%s'"
" that is a not a pointer"_err_en_US;
msg =
"%s is associated with the result of a reference to function '%s' that is not a pointer"_err_en_US;
} else if (isContiguous_ &&
!funcResult->attrs.test(FunctionResult::Attr::Contiguous)) {
auto restorer{common::ScopedSet(lhs_, symbol)};
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/assign02.f90
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ subroutine s9
real, target :: x
real, pointer :: p
p => f1()
!ERROR: pointer 'p' is associated with the result of a reference to function 'f2' that is a not a pointer
!ERROR: pointer 'p' is associated with the result of a reference to function 'f2' that is not a pointer
p => f2()
contains
function f1()
Expand Down