[flang-commits] [flang] e09e956 - [flang] Downgrade error to warning (#83032)
via flang-commits
flang-commits at lists.llvm.org
Fri Mar 1 16:54:38 PST 2024
Author: Peter Klausler
Date: 2024-03-01T16:54:35-08:00
New Revision: e09e9567fc1cfc949810cc85f09e1b894ce946df
URL: https://github.com/llvm/llvm-project/commit/e09e9567fc1cfc949810cc85f09e1b894ce946df
DIFF: https://github.com/llvm/llvm-project/commit/e09e9567fc1cfc949810cc85f09e1b894ce946df.diff
LOG: [flang] Downgrade error to warning (#83032)
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 https://github.com/llvm/llvm-project/issues/82210.
Added:
Modified:
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/resolve61.f90
Removed:
################################################################################
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index b7b46257169e36..5a95d3a98992a7 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -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);
}
}
}
diff --git a/flang/test/Semantics/resolve61.f90 b/flang/test/Semantics/resolve61.f90
index d6499f07b86091..32bf9091a85651 100644
--- a/flang/test/Semantics/resolve61.f90
+++ b/flang/test/Semantics/resolve61.f90
@@ -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
More information about the flang-commits
mailing list