This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33162] INTRINSIC functions as ACTUAL argument
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2007 14:14:28 -0000
- Subject: [Bug fortran/33162] INTRINSIC functions as ACTUAL argument
- References: <bug-33162-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-09-05 14:14 -------
Besides the argument kind checking of specific intrinsic procedures and
besides using specific intrinsic as name in the PROCEDURE statement, the
following fails as well. The error message is:
Error: Type/rank mismatch in argument 'a' at (1)
This program works with NAG f95, g95, ifort, openf95 ...
module m
implicit none
contains
subroutine sub(a)
interface
function a(x)
real :: a, x
intent(in) :: x
end function a
end interface
optional :: a
if(present(a)) print *, a(4.0)
end subroutine sub
end module m
use m
implicit none
intrinsic cos
call sub()
call sub(cos)
end
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |30871
nThis| |
Keywords| |rejects-valid
Summary|Type checking absent for |INTRINSIC functions as
|specific names of INTRINSIC |ACTUAL argument
|functions |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33162