[flang-commits] [flang] [Flang] Fix crash in structure constructor lowering for PDT (PR #183543)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Mar 2 11:52:58 PST 2026


================
@@ -532,6 +532,8 @@ static mlir::Value genInlinedStructureCtorLitImpl(
   for (const auto &[sym, expr] : ctor.values()) {
     const Fortran::semantics::DerivedTypeSpec *componentParentType =
         sym->owner().derivedTypeSpec();
+    if (!componentParentType)
----------------
eugeneepshteyn wrote:

Please also add TODO comment here to indicate that this is not a complete fix. (Maybe copy the info from the description.)

If this produces incorrect HLFIR, then perhaps it should be a "not implemented" error instead, so that we get an error instead of a crash.

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


More information about the flang-commits mailing list