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

Semantics and test for ENTRY statements #1086

Closed klausler closed 4 years ago

klausler commented 4 years ago

Checks the constraints and the feasible "shalls" in 15.6.2.6 for ENTRY statements, their dummy arguments, and their results.

Symbols for the entry points are created in the parent scope of the containing subprogram, and point to the scope of the containing subprogram. Symbols for ENTRY results, when functions, are within the scope of the containing subprogram.

This PR checks semantics only; it doesn't do anything to represent sharing of dummy arguments, storage association of function results, &c.

klausler commented 4 years ago

Testing against f90_correct shows that there's still some bugs to fix in this code, so updates are coming. I'll comment again when all tests are passing. Also, I need to figure out how to emit ENTRY points in module files.

klausler commented 4 years ago

Ok, the tests are greatly extended to cover additional cases, and they pass; so do all of the cases in the PGI Fortran suite. And I've figured out how I think ENTRY should interact with module files.