fortran-src icon indicating copy to clipboard operation
fortran-src copied to clipboard

Provide more structure/derived data type analysis

Open raehik opened this issue 3 years ago • 3 comments

Based on a conversation with @RaoulHC , we don't appear to gather type information for structures/derived data types during type analysis. The analysis at Analysis.Types outputs a TypeEnv = Map Name IDType. We could build and output a Map Name (Map Name IDType) alongside it that maps DDT/record type names to a map of their fields & corresponding types.

raehik avatar Aug 23 '21 14:08 raehik

Is this also a problem in fotran-vars?

dorchard avatar Aug 23 '21 14:08 dorchard

The StructureTable module in fortran-vars deals with this, so if we're to move over to using information from the analysis phase we'll need it to do something similar to that.

RaoulHC avatar Aug 23 '21 15:08 RaoulHC

Support for regular fields (not union, internal structure extensions) added in #175 thanks to @RaoulHC . I'll keep this issue around for a while -- interested in seeing if there's any way we can improve transformations or analyses in CamFort with this new info.

raehik avatar Sep 01 '21 16:09 raehik