Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offset normalization to Fortran frontend #1367

Merged
merged 24 commits into from Sep 11, 2023
Merged

Conversation

mcopik
Copy link
Contributor

@mcopik mcopik commented Sep 8, 2023

This PR contributes a Fortran AST pass to normalize all array offsets. In addition, it fixes a few additional problems:

  • Adds a pass to assign parent scope to each AST node.
  • Adds a pass accumulating all variable declarations in a given scope.
  • Fixes handling of Fortran array assignment when offsets are present.

@acalotoiu I'm going to do a few more tests covering more complex function invocations and 3D arrays. Please look when you can to verify this is the intended behavior.

mcopik and others added 22 commits August 14, 2023 18:38
@mcopik mcopik self-assigned this Sep 8, 2023
Copy link
Contributor

@acalotoiu acalotoiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parent of a node can also be a module no just a function, subroutine or program. The full complexity of Fortan in general is even broader, but modules we require support for directly.

@mcopik
Copy link
Contributor Author

mcopik commented Sep 8, 2023

The parent of a node can also be a module no just a function, subroutine or program. The full complexity of Fortan in general is even broader, but modules we require support for directly.

@acalotoiu Fixed in commit 70c33dd, I also added a test verifying we catch the module as a parent node.

@acalotoiu acalotoiu self-requested a review September 11, 2023 18:40
Copy link
Contributor

@acalotoiu acalotoiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now. Thanks!

@acalotoiu acalotoiu merged commit 680a956 into master Sep 11, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants