This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40041] spurious warning with INTRINSIC statement
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 May 2009 11:57:06 -0000
- Subject: [Bug fortran/40041] spurious warning with INTRINSIC statement
- References: <bug-40041-13648@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from dfranke at gcc dot gnu dot org 2009-05-06 11:57 -------
(In reply to comment #1)
> > The same warnings are given if the arguments of ABS/MAX are of default-real
> > kind, so this not related to implicit typing.
>
> I have to admit that I don't fully understand that sentence, but I don't get
> the warning with IMPLICIT NONE. I also don't see the relation to the arguments
> of ABS/MAX -- I think it is about implicit typing of the result value of
> ABS/MAX itself.
IIRC, typing of 'a' and 'n' is enough to avoid the warnings as well.
In above statement I assumed some interaction between INTEGER actual arguments
to an implicitly typed REAL ABS-function - and REAL-typed arguments to the
implicitly INTEGER-typed MAX-function. Thus, converting all the arguments to
REAL as in
a(n) = MAX(ABS(2.0),ABS(3.0),REAL(n))
one could think that the warnings should vanish - they don't. So, I concluded,
that it's not related to the argument types.
Btw, adding "REAL ABS,MAX" doesn't help either, so it's not related to the
function's types.
I'll give your patch a try later today.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40041