diff --git a/flang/lib/Optimizer/Builder/HLFIRTools.cpp b/flang/lib/Optimizer/Builder/HLFIRTools.cpp --- a/flang/lib/Optimizer/Builder/HLFIRTools.cpp +++ b/flang/lib/Optimizer/Builder/HLFIRTools.cpp @@ -483,7 +483,7 @@ return builder.create(loc, s.getExtents()); } if (entity.getType().isa()) - TODO(loc, "get shape from HLFIR expr without producer holding the shape"); + return builder.create(loc, entity.getBase()); // There is no shape lying around for this entity. Retrieve the extents and // build a new fir.shape. return builder.create(loc,