Skip to content

Commit

Permalink
[flang] Downgrade error to warning (#83032)
Browse files Browse the repository at this point in the history
It's probably a bad idea to have a Cray pointer whose type is a derived
type that is not a sequence type, but the feature is a nonstandard
extension in the first place. Downgrade the message to a warning.

Fixes #82210.
  • Loading branch information
klausler committed Mar 2, 2024
1 parent 164c098 commit e09e956
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flang/lib/Semantics/resolve-names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6037,7 +6037,7 @@ void DeclarationVisitor::Post(const parser::BasedPointer &bp) {
if (const auto *derived{pointeeType->AsDerived()}) {
if (!IsSequenceOrBindCType(derived)) {
Say(pointeeName,
"Type of Cray pointee '%s' is a derived type that is neither SEQUENCE nor BIND(C)"_err_en_US);
"Type of Cray pointee '%s' is a derived type that is neither SEQUENCE nor BIND(C)"_warn_en_US);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/resolve61.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ subroutine p12
type(t2) :: x2
type(t3) :: x3
pointer(a, x1)
!ERROR: Type of Cray pointee 'x2' is a derived type that is neither SEQUENCE nor BIND(C)
!WARNING: Type of Cray pointee 'x2' is a derived type that is neither SEQUENCE nor BIND(C)
pointer(b, x2)
pointer(c, x3)
end
Expand Down

0 comments on commit e09e956

Please sign in to comment.