[flang-commits] [flang] a7e5bf9 - [flang][runtime] Handle array components in NAMELIST input
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Thu Oct 6 15:22:44 PDT 2022
Author: Peter Klausler
Date: 2022-10-06T15:22:30-07:00
New Revision: a7e5bf9889d24920af2ed06b1cd4c75a336603f0
URL: https://github.com/llvm/llvm-project/commit/a7e5bf9889d24920af2ed06b1cd4c75a336603f0
DIFF: https://github.com/llvm/llvm-project/commit/a7e5bf9889d24920af2ed06b1cd4c75a336603f0.diff
LOG: [flang][runtime] Handle array components in NAMELIST input
A namelist input item that is a derived type component reference
needs additional processing when the base item or the component
is an array. When both have rank > 0, the component reference
must of course be subscripted.
(Fixes https://gitlab-master.nvidia.com/fortran/f18-stage/-/issues/999, NAG test t/tz2.)
Added:
Modified:
flang/runtime/type-info.cpp
Removed:
################################################################################
diff --git a/flang/runtime/type-info.cpp b/flang/runtime/type-info.cpp
index ecc2bf9e28d9..7413ad0fd981 100644
--- a/flang/runtime/type-info.cpp
+++ b/flang/runtime/type-info.cpp
@@ -127,6 +127,7 @@ void Component::CreatePointerDescriptor(Descriptor &descriptor,
EstablishDescriptor(descriptor, container, terminator);
if (subscripts) {
descriptor.set_base_addr(container.Element<char>(subscripts) + offset_);
+ descriptor.raw().rank = 0;
} else {
descriptor.set_base_addr(container.OffsetElement<char>() + offset_);
}
More information about the flang-commits
mailing list