@@ -673,6 +673,20 @@ fir::factory::createExtents(fir::FirOpBuilder &builder, mlir::Location loc,
673
673
return extents;
674
674
}
675
675
676
+ // FIXME: This needs some work. To correctly determine the extended value of a
677
+ // component, one needs the base object, its type, and its type parameters. (An
678
+ // alternative would be to provide an already computed address of the final
679
+ // component rather than the base object's address, the point being the result
680
+ // will require the address of the final component to create the extended
681
+ // value.) One further needs the full path of components being applied. One
682
+ // needs to apply type-based expressions to type parameters along this said
683
+ // path. (See applyPathToType for a type-only derivation.) Finally, one needs to
684
+ // compose the extended value of the terminal component, including all of its
685
+ // parameters: array lower bounds expressions, extents, type parameters, etc.
686
+ // Any of these properties may be deferred until runtime in Fortran. This
687
+ // operation may therefore generate a sizeable block of IR, including calls to
688
+ // type-based helper functions, so caching the result of this operation in the
689
+ // client would be advised as well.
676
690
fir::ExtendedValue fir::factory::componentToExtendedValue (
677
691
fir::FirOpBuilder &builder, mlir::Location loc, mlir::Value component) {
678
692
auto fieldTy = component.getType ();
0 commit comments