[llvm] [Flang-rt][build] fixes building warnings under gcc: (PR #173955)

Eugene Epshteyn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 1 04:35:09 PST 2026


================
@@ -159,7 +159,7 @@ template <typename CHAR, bool ADJUSTR>
 static RT_API_ATTRS void AdjustLRHelper(Descriptor &result,
     const Descriptor &string, const Terminator &terminator) {
   int rank{string.rank()};
-  SubscriptValue ub[maxRank], stringAt[maxRank];
+  SubscriptValue ub[maxRank]{}, stringAt[maxRank];
----------------
eugeneepshteyn wrote:

For `rank` of 0 the values of `ub` are not accessed and not used, so it doesn't matter whether they are initialized.

https://github.com/llvm/llvm-project/pull/173955


More information about the llvm-commits mailing list