[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    Re: either SUBROUTINEs or FUNCTIONs
From:       Paul Richard Thomas <paul.richard.thomas () gmail ! com>
Date:       2012-04-24 11:09:18
Message-ID: CAGkQGi+7pUzR-N8ZqwwU--c+TDcbSF7v1NTkBS06FV_GDJ7Rsw () mail ! gmail ! com
[Download RAW message or body]

Dear Marco,

In 14.1.2.3 of the F95 standard, you will find "Within a scoping unit,
two procedures that have the same generic name shall both be
subroutines
or both be functions, and....."

The draft standard is available at the gfortran wiki -
http://gcc.gnu.org/wiki/GFortran

Best regards

Paul

On Tue, Apr 24, 2012 at 12:23 PM, Marco van Hulten
<Marco.van.Hulten@knmi.nl> wrote:
> Dear all,
>
> When compiling sosie [1] I found a problem:
>
> $ make
> gfortran -O3 -J./mod -I./mod -I/usr/people/hulten/installed64/include
> -c src/io_ezcdf.f90 -o obj/io_ezcdf.o
> src/io_ezcdf.f90:1261.2:
>
> FUNCTION ctest_coor(rx, ry, rd)
> 1
> Error: In generic interface 'iecdf' at (1) procedures must be either
> all SUBROUTINEs or all FUNCTIONs
> make: *** [obj/io_ezcdf.o] Error 1
>
>
> Does the Fortran 90/95 standard say that this needs to be the case, or
> is it a shortcoming of gfortran?
>
> I am using gfortran 4.6.3 on Fedora 16, 64 bit, netcdf 4.2 (or 4.1.1).
>
> Cheers,
>
> Marco
>
> [1] http://sosie.sourceforge.net/



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic