ecmwf-ifs / loki

Freely programmable source-to-source translation for Fortran
https://sites.ecmwf.int/docs/loki/
Apache License 2.0
29 stars 12 forks source link

Add module imports to intermediate layers when hoisting temporaries #297

Closed awnawab closed 3 months ago

awnawab commented 5 months ago

If module imports are used to define temporary array sizes deep in a call-tree, these variables might be undefined in intermediate layers when the temporaries are hoisted up to the driver. This should be taken care of by the transformation, possibly by storing all array size related module imports in item.trafo_data, and subsequently appending these imports as necessary to subroutine.spec as we move up the call-tree.

reuterbal commented 3 months ago

Will this be fixed by #321?