This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33141] Intrinsic procedures: Improve warning/error with -std=*
- From: "domob at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2008 09:38:07 -0000
- Subject: [Bug fortran/33141] Intrinsic procedures: Improve warning/error with -std=*
- References: <bug-33141-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from domob at gcc dot gnu dot org 2008-07-19 09:38 -------
I want to work on this and started experimenting... Consider this test:
! ASINH is an intrinsic function as of F2008, not before.
! XXX: I hope so...
REAL FUNCTION asinh (arg)
IMPLICIT NONE
REAL :: arg
! Do something wrong here
asinh = arg
END FUNCTION asinh
PROGRAM main
IMPLICIT NONE
REAL :: asinh
WRITE (*,*) asinh (1.)
END PROGRAM main
When compiled with -std=f2008 -Wall, it calls the intrinsic "correct" asinh. I
suspect, in this case we want a warning to be emitted, right?
For -std=f2003 without -Wall or -fall-intrinsics, the same happens. With
-std=f2003 -Wall, I get an error that the intrinsic is not part of the selected
standard--my question: Is this correct? Shouldn't in this case my supplied
function be called as if it were named, say, asinhX instead of asinh?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33141