[flang-commits] [flang] [flang][semantic] parser node types and rewrite for assumed-shape-bounds-spec (PR #211690)

Caroline Newcombe via flang-commits flang-commits at lists.llvm.org
Fri Jul 24 08:09:59 PDT 2026


================
@@ -272,6 +273,32 @@ static bool shouldRewriteShapeSpecListToExplicitBounds(
   return foundArray;
 }
 
+static bool shouldRewriteAssumedShapeSpecListToAssumedBounds(
+    SemanticsContext &context, const parser::ArraySpec &x) {
+  auto &assumedShapeSpecList{std::get<std::list<parser::AssumedShapeSpec>>(
----------------
cenewcombe wrote:

Recommend dropping the `const_cast` so that this reads as `std::get<...>(x.u)`, similar to the explicit bounds rewrite above.

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


More information about the flang-commits mailing list