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

Adding intent(in) #1392

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmikushin
Copy link
Contributor

Planting intent(in) all over the code, per strict modern Fortran compilers requirements. Do not duplicate eq and == , ne and /= operators definitions, as they seem to be already aliases of each other, and compilers are not happy if we try to overdefine this fact.

…ilers requirements. Do not duplicate eq and == , ne and /= operators definitions, as they seem to be already aliases of each other, and compilers are not happy if we try to overdefine this fact
@bryanpkc
Copy link
Collaborator

@dmikushin For reference, could you identify the code in flang1 that aliases operators .ne. etc. to /= etc.? Also, could you attach the binary output of compliing these files with and without the intent(in), to show that your change has no adverse impact on performance?

@bryanpkc
Copy link
Collaborator

@dmikushin gentle ping

@dmikushin
Copy link
Contributor Author

dmikushin commented Oct 18, 2023

intent(in) is an element of Fortran interfaces design rules, such as iso_c_bindings. AFAIK, it does not change the compilation result, and focuses entirely on mandatory understanding by the developer his/her own code. The requirements used by PGI/Intel are in fact more liberal than the actual Fortran standard. So the main point of this PR is that its makes the code more standard-compliant, NFC.

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.

2 participants