Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#981 closed Bug (fixed)

pointer association in wkr_nemo.F90 breaks with ifort

Reported by: momme Owned by: nemo
Priority: normal Milestone:
Component: OCE Version: trunk
Severity: Keywords: fortran
Cc: Branch review:
MP ready?: Task progress:


The pointer intent(inout) declaration of the arguments p1d01,… and similar all through the rest of the module breaks compilation fatally with ifort, giving the error message:
"A pointer dummy argument with the INTENT(IN) attribute shall not appear as an actual argument if the associated dummy argument has the INTENT(OUT) or INTENT(INOUT) attribute."
(lines 151 following)

Commit History (0)

(No commits)

Change History (7)

comment:1 Changed 9 years ago by acc

This doesn't occur with version 11.1 of the ifort compiler. This may be a compiler bug if you are using an older version. Please specify which version of the compiler you are using.

comment:2 Changed 9 years ago by momme

  • Version changed from nemo_v3_4 to trunk

compiler version is 10.1

comment:3 Changed 9 years ago by acc

  • Resolution set to fixed
  • Status changed from new to closed

Not exactly a compiler bug but definitely a compiler incompatibility. Intents on pointers were introduced in the Fortran 2003 standard:

INTENT was not permitted to be specified in Fortran 95 for pointer dummy arguments because of the ambiguity of whether it should refer to the pointer association status, the value of the target, or both. INTENT is permitted in Fortran 2003; it refers to the pointer association status and has no bearing on the value of the target.

Intel introduced support for the Fortran 2003 standard from 11.0 onwards. Looks like a compiler upgrade is the only solution.

comment:4 Changed 5 years ago by nicolasmartin

  • Keywords fortran added; ifort removed

comment:5 Changed 5 years ago by nicolasmartin

  • Keywords association removed

comment:6 Changed 5 years ago by nicolasmartin

  • Keywords intent removed

comment:7 Changed 5 years ago by nicolasmartin

  • Keywords pointer removed
Note: See TracTickets for help on using tickets.