[flang-commits] [flang] 4e92962 - [flang] Fix legitimate warning from latest GCC
peter klausler via flang-commits
flang-commits at lists.llvm.org
Tue Jul 20 11:40:44 PDT 2021
Author: peter klausler
Date: 2021-07-20T11:40:34-07:00
New Revision: 4e92962127a30ee8958858b9a354490ba36924b2
URL: https://github.com/llvm/llvm-project/commit/4e92962127a30ee8958858b9a354490ba36924b2
DIFF: https://github.com/llvm/llvm-project/commit/4e92962127a30ee8958858b9a354490ba36924b2.diff
LOG: [flang] Fix legitimate warning from latest GCC
A rank-0 static descriptor needs to be a vector; it's for
"v-list" values in defined derived type formatted I/O.
(Pushed without pre-review due to high confidence and an
unwell buildbot.)
Added:
Modified:
flang/runtime/descriptor-io.cpp
Removed:
################################################################################
diff --git a/flang/runtime/descriptor-io.cpp b/flang/runtime/descriptor-io.cpp
index 2e552b7c5228e..20828a6d9a84e 100644
--- a/flang/runtime/descriptor-io.cpp
+++ b/flang/runtime/descriptor-io.cpp
@@ -32,7 +32,7 @@ std::optional<bool> DefinedFormattedIo(IoStatementState &io,
ioType, io.mutableModes().inNamelist ? "NAMELIST" : "LISTDIRECTED");
ioTypeLen = std::strlen(ioType);
}
- StaticDescriptor<0, true> statDesc;
+ StaticDescriptor<1, true> statDesc;
Descriptor &vListDesc{statDesc.descriptor()};
vListDesc.Establish(TypeCategory::Integer, sizeof(int), nullptr, 1);
vListDesc.set_base_addr(edit.vList);
More information about the flang-commits
mailing list