PSyclone
PSyclone copied to clipboard
(Closes #2515) fix bugs in symbol-table merge
As it says. Primarily this is about making sure we don't rename symbols that are being imported into scope from elsewhere. Broken out of #924 as that is getting big.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.86%. Comparing base (
ed742fd) to head (4c86703).
Additional details and impacted files
@@ Coverage Diff @@
## master #2517 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 357 357
Lines 48234 48300 +66
=======================================
+ Hits 48168 48234 +66
Misses 66 66
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Ready for a first look. Probably one for @sergisiso as it adds some SymbolTable functionality, as well as fixing some bugs. I've triggered the integration tests. Note that the sphinx-link-check in the CI has mysteriously cancelled itself. Also, CodeCov is having one of its moments and is not reporting on coverage.
Taking this back as the LFRic and NEMO integration tests failed :-(
Allowing for intrinsics has fixed the LFRic integration tests. However, the NEMO MO passthrough still fails:
Executing:psyclone --limit output -api nemo -oalg /dev/null -opsy diatmb.f90 cfgs/MO_GO8_gnu/BLD/ppsrc/nemo/diatmb.f90
...
psyclone.psyir.symbols.symbol.SymbolError: PSyclone SymbolTable error: A symbol named 'iom_put' is present but unresolved in both tables and they do not share a wildcard import that could be bringing it into scope.
This is in a routine that has no imports. 'iom_put' is brought into scope by a wildcard import from iom at module level.
The problem is in the Routine handler in the Fortran backend: we flatten all tables by populating a brand-new one. However, the brand-new one is not (initially) connected into the node hierarchy and therefore the search for a common wildcard import returns nothing.
Finally got all of the integration tests to pass. Really ready for review now!
CodeCov really isn't happy so I've checked the coverage for symbol_table.py locally and all is fine. I've tried firing off the CI again so maybe CodeCov will sort itself out.
Anyway, ready for another look now.
Should be ready for another look now, integration tests permitting.