flang-compiler / f18

F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler
230 stars 48 forks source link

evaluate::AttachDeclaration() doesn't work with derived types defined in modules #1106

Open psteinfeld opened 4 years ago

psteinfeld commented 4 years ago

When a derived type is declared in a separate module file, the function "evaluate::AttachDeclaration()" doesn't find the source provenance information for the base derived type.

From what I can tell, it looks like the is no UseDetails information assoicated with the symbol, and things go south from there.

I've attached three files -- m.f90.txt, which is the module that defines the derived type, bug.f90.txt, which is the source file that erroneously references the derived type, and bug.log, which contains the output from the compiler when "AttachDeclaration()" is called on the symbol associated with the type "coarrayType" that's defined in m.f90.

bug.f90.txt bug.log m.f90.txt