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

[w3ounfmeta] INTENT mismatch #489

Closed
ukmo-ccbunney opened this issue Oct 7, 2021 · 0 comments · Fixed by #499
Closed

[w3ounfmeta] INTENT mismatch #489

ukmo-ccbunney opened this issue Oct 7, 2021 · 0 comments · Fixed by #499
Assignees
Labels
bug Something isn't working

Comments

@ukmo-ccbunney
Copy link
Collaborator

Describe the bug
Some compilers fail to compile w3ounfmeta.ftn with an error relating to the INTENT of the META pointer variable in the READ_META_PAIRS subroutine. The Cray Fortran compiler at version 8.3.4 gives an compile error, but newer versions do not.

A simple fix is to change the intent of the META variable to INOUT

To Reproduce
Compile ww3_ounf with the Cray Fortran compiler version 8.3.4:

ftn-786 crayftn: ERROR READ_META_PAIRS, File = w3ounfmetamd.F90, Line = 1025, Column = 40
  An actual argument must be definable when associated with a dummy argument that has INTENT(OUT) or INTENT(INOUT).

Expected behavior
Compilation fails with the above error message.

Additional context
The compile time error has so far only been found to be reported by the cray compiler at the specified revision. The GNU and Intel compilers work fine. I suspect (but have not confirmed) that it is due to the definition of the scope of the INTENT statement for POINTER variables; i.e. setting INTENT(IN) on a pointer to a derived type stops you from changing the pointer association, but should it stop you from also changing the value of a variable in the derived type target? I suspect it should not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant