flang
flang copied to clipboard
Adding intent(in)
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.
@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?
@dmikushin gentle ping
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.