Welcome back! This week marked another important milestone in our ongoing effort to compile the full FPM stack using
LFortran.
I focused on resolving several compatibility and compilation issues within
toml-f,
. These fixes mostly handles how our asr_to_llvm handlles polymorphic variables. In parallel, I expanded the scope of testing and debugging to include
additional libraries that are part of the FPM dependency, ensuring broader compatibility and a speedy compilation.
Work done in this week:
-
toml-f MREs and Fixes:
- Addressed multiple blocking issues related to class-struct compatibility and class parameter handling.
- By fixing these issues, I resolved many blockers in toml-f compilation for which workarounds were not feasible.
- Also we have around 90% compilation of toml-f done with some workarounds, which I will try to complete in next week.
- I have pushed around 10-12 pull requests for toml-f issue fixing which are merged and many blockers were resolved by these. Link of all PRs: toml-f fixes
-
fortran-shlex MREs and Fixes:
- Successfully compiled the entire fortran-shlex library with 2 workarounds using LFortran with no remaining errors. Tests is still left which will do in next week.
- Here issues found were related to character array and polymorphic variables.
-
Example Workarounds:
-
Example MREs:
-
Issue 7604: Handle struct array comparion in frontend
-
Issue 7605: Handle character array assignment to a ArrayConstructor
-
Example Fix: Fix 7543: fix: initialize character variable length=1 if only kind is provided
-
fortran-regex MREs:
- Began analysis of fortran-regex, which is another small dependency for FPM.
- Created initial MREs related to character array handling, struct type StructInstanceMemeber used at different places etc.
- These will serve as the base for upcoming fixes and compiler enhancements in the following week.
- Example MREs:
-
Issue 7547: Handle inititialization of character 2-D array using reshape
-
Issue 7548: Struct type used when SIM is passed as argument in subroutine is incorrect
-
Issue 7562: Handle StructType StructInstanceMember as function/subroutine argument with `intent=out/inout`
- Thanks to Pranav for helping in compilation of fortran-regex.
Overall, I logged about 20 hours this week. The successful compilation of fortran-shlex and fortran-regex is set up at CI, and work is progressing steadily on both toml-f and fortran-shlex. Each fix brings us one step closer to get it completely compiled.
Many thanks to
Ondřej Čertík
and
Pranav Goswami
for continued mentorship, reviews, and feedback. Thanks to all LFortran members for continuously helping out.
Plan for next week:
- Complete testing for fortran-shlex to move it closer to full compatibility.
- Revisit toml-f to generate some last few MREs for compilation and begin running its full test suite with LFortran.
- With generating MREs and creating workarounds I will be actively pushing fixes need to some issues which are high priority or blocker.