This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR18769, PR25049 and PR25050 - transformational functions in initialization expressions.


A number of transformational intrinsic functions are not permitted in initialization expressions (please see the standard or the ChangeLog for the list). These are not implemented in simplify.c and, in consequence, and ICE ensues on trying to deploy them in initialization expressions. This patch detects the incorrect usage in check.c and emits an error there. check.c was chosen because no further selection of intrinsic funtions was needed; the usual mechanism applies.

I'm probably mistaken here, but I thought there was a difference between what F95 allowed as initialization expr. and what F2003 allows. For example, the way I read and understood both standards, the following code:


  INTEGER, PARAMETER :: K(2)=1
  SELECT CASE(I)
  CASE(MAXLOC(K,1))
  END SELECT
  END

(from PR 25104) is invalid in F95 but valid according to F2003.

Am I right?

FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]