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

[flang1] Fix the issue with contiguous dummy argument arrays (#1426) #1430

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

shivaramaarao
Copy link
Collaborator

When array dummy arguments are marked with contiguous attribute, the compiler need to generate and pass sequential copy of formal arguments.

This issue is fixed as part of this commit.

Copy link
Collaborator

@pawosm-arm pawosm-arm left a comment

Choose a reason for hiding this comment

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

Is this patch complete? No changes to flang1's semfunc.c needed?

Also, this is not a real problem, but, both C and Fortran codes have some formatting issues, and Fortran subroutine seems to have wrong indent.

When array dummy arguments are marked as contiguous,compiler need to generate
and pass sequential copy of formal arguments.

This issue is fixed as part of this commit.
@shivaramaarao
Copy link
Collaborator Author

Is this patch complete? No changes to flang1's semfunc.c needed?

Also, this is not a real problem, but, both C and Fortran codes have some formatting issues, and Fortran subroutine seems to have wrong indent.

semfunc.c changes are not required. The change was to do runtime is_contiguous check for dummy arguements instead of compile time check. If the compiler is making sure that the array passed are contiguous those changes are not needed.

@pawosm-arm pawosm-arm self-requested a review November 6, 2023 15:36
Copy link
Collaborator

@bryanpkc bryanpkc left a comment

Choose a reason for hiding this comment

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

LGTM, though I agree with @pawosm-arm that both test/f90_correct/src/c_cont01.c and test/f90_correct/src/cont01.f90 should be formatted to be consistent with the rest of the code base.

@pawosm-arm pawosm-arm merged commit 4df6dac into master Nov 15, 2023
6 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.

3 participants