This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: intrinsic statement
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Daniel Franke <franke dot daniel at gmail dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Tue, 5 May 2009 14:58:27 -0700
- Subject: Re: intrinsic statement
- References: <200905052340.15051.franke.daniel@gmail.com>
On Tue, May 05, 2009 at 11:40:14PM +0200, Daniel Franke wrote:
>
> Dear all,
>
> while eliminating warnings from a dated fortran source, I extracted the
> example below. I believe the the warnings are incorrect, but I'm not sure?!
>
> $> cat foo.f
> INTRINSIC ABS, MAX
> a(n) = MAX(ABS(2),ABS(3),n)
> END
>
> $> gfortran-svn -Wall -Wextra foo.f
> foo.f:1.21:
>
> INTRINSIC ABS, MAX
> 1
> Warning: Type specified for intrinsic function 'abs' at (1) is ignored
> foo.f:1.26:
>
> INTRINSIC ABS, MAX
> 1
> Warning: Type specified for intrinsic function 'max' at (1) is ignored
>
>
> Simply removing the intrinsic statement cures this, of course, but that's not
> the point :)
>
> Pointers and comments welcome!
>
I think you might be running into the second sentence of 5.1.2.8:
The INTRINSIC attribute confirms that a name is the specific
name (13.6) or generic name (13.5) of an intrinsic procedure.
The INTRINSIC attribute allows the specific name of an intrinsic
procedure that is listed in 13.6 and not marked with a bullet (·)
to be used as an actual argument (12.4).
The specific name ABS() takes a default real and returns a default
real.
--
Steve