Re: Symbols in function return specifiers



Daniel Kraft wrote:
fj wrote:
On 18 août, 19:01, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
Daniel Kraft <d...@xxxxxxxx> wrote:
I'm wondering whether the following is legal and if so, what the exact
meaning is:
CHARACTER(len=x) FUNCTION test (x)
IMPLICIT REAL(x)
INTEGER :: x
END FUNCTION test

Strange : I tested the example with 3 compilers (g95, ifort and
gfortran) :

g95 and gfortran compile the two cases without any warning, even with -
Wall. ifort compiles only when the type of the function is declared
after the declaration INTEGER :: x

I'm working on gfortran, so this is the reason why gfortran does not yet
complain... It will in the future, however, if I get this fixed
correctly :)

Daniel,

while you are at it, PR30239 seems to be related (or a special case of
yours).

Regards

Daniel

.



Relevant Pages

  • Re: Portable isfinite for gfortran 4.0.3 and ifort 8.1/9.0
    ... following three compilers ... gfortran 4.0.3, ifort 8.1, and ifort 9.0 ... You probably want to upgrade to at least gfortran 4.1.1. ... optimization flags. ...
    (comp.lang.fortran)
  • Re: Symbols in function return specifiers
    ... END FUNCTION test ... I tested the example with 3 compilers (g95, ... g95 and gfortran compile the two cases without any warning, ... ifort compiles only when the type of the function is declared ...
    (comp.lang.fortran)
  • Re: Zero-size arrays
    ... were also found in ifort, gfortran, pathscale and some more which I do ... and commercial compilers in this regard; ... Fortran 90/95, but with configure check also things like Fortran ...
    (comp.lang.fortran)
  • Re: Zero-size arrays
    ... were also found in ifort, gfortran, pathscale and some more which I do ... and commercial compilers in this regard; ... Fortran 90/95, but with configure check also things like Fortran ...
    (comp.lang.fortran)
  • Re: Compilation problem with gfortran
    ... I'm trying to compile some code of mine with gfortran. ... Argument 'dydx' of pure subroutine 'rkckcontrolstep' at must ... Sun compilers accept this, but I appreciate that that isn't a definitive ...
    (comp.lang.fortran)