You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Describe the bug
Some compilers fail to compile
w3ounfmeta.ftn
with an error relating to the INTENT of theMETA
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 toINOUT
To Reproduce
Compile
ww3_ounf
with the Cray Fortran compiler version 8.3.4: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.
The text was updated successfully, but these errors were encountered: