[NFC][flang] Remove unused code in lowerExplicitLowerBounds
authorPeixin-Qiao <qiaopeixin@huawei.com>
Thu, 24 Mar 2022 08:50:20 +0000 (16:50 +0800)
committerPeixin-Qiao <qiaopeixin@huawei.com>
Thu, 24 Mar 2022 08:50:38 +0000 (16:50 +0800)
There is no need to lower the implicit lower bounds for assumed-shape
array in lowerExplicitLowerBounds. Remove the unused code.

Reviewed By: Jean Perier

Differential Revision: https://reviews.llvm.org/D122280

flang/lib/Lower/ConvertVariable.cpp

index 7bb238b..361f23b 100644 (file)
@@ -1060,9 +1060,6 @@ static void lowerExplicitLowerBounds(
       mlir::Value lb = builder.createConvert(
           loc, idxTy, genScalarValue(converter, loc, expr, symMap, stmtCtx));
       result.emplace_back(lb);
-    } else if (!spec->lbound().isColon()) {
-      // Implicit lower bound is 1 (Fortran 2018 section 8.5.8.3 point 3.)
-      result.emplace_back(builder.createIntegerConstant(loc, idxTy, 1));
     }
   }
   assert(result.empty() || result.size() == box.dynamicBound().size());