Re: gfortran -std=f95 overzealous?



On Jan 21, 2:38 pm, ka...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G.
Kargl) wrote:
In fact, len_trim() at least works as advertised.


I should have been more precise in my original post:

I use "index" and "len_trim" in some ARRAY initialization expressions
and
gfortran complains that their use here is an extension to the
Fortran-95 standard. None of my other compilers complain (with f95
compliance ON). The standard seems to say any ELEMENTAL intrinsic
involving
only integer and/or character types is allowed.

Its not a big deal because the code is compiled and executed correctly
by gfortran which just complains (I think we agree erroneously) with -
std=f95.

Al

PS. Here's a simple test case to compile with and without -std=f95

module bug
character(*),dimension(3),parameter :: a=(/'a() ','b(,) ','c(,,)'/)
integer,dimension(3),parameter :: l=len_trim(a),i=index(a,'(')
end


.



Relevant Pages

  • Re: generic interface real function vs real
    ... and other compilers certainly did accept it but ... Lahey also complains. ... the basis of any properties other than type, kind type parameters, and ... KIND types available in the g95 compiler (at the time of writing quad ...
    (comp.lang.fortran)
  • Re: generic interface real function vs real
    ... and other compilers certainly did accept it but ... Lahey also complains. ... unambiguous, but still invalid, because: "the rules do not distinguish on ...
    (comp.lang.fortran)
  • Re: "Implicit" use of assignment(=)
    ... ifort 13.0.0 20120731 and gfortran ... complains. ... Note that, as I alluded to previously, neither of the compilers you ... it is not valid to deduce the specifications of f2003 based on ...
    (comp.lang.fortran)