This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR18769, PR25049 and PR25050 - transformational functions in initialization expressions.
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 18 Jun 2006 10:44:09 +0200
- Subject: Re: [Patch, fortran] PR18769, PR25049 and PR25050 - transformational functions in initialization expressions.
- References: <4494AAD8.3030805@wanadoo.fr>
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