This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32157] intrinsic function name conflicts with subroutine if present in the same file
- 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: 30 May 2007 16:58:58 -0000
- Subject: [Bug fortran/32157] intrinsic function name conflicts with subroutine if present in the same file
- References: <bug-32157-14284@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-05-30 16:58 -------
> When I compile the program listed below I get the message "Error: Global name
> 'len' at (1) is already being used as a FUNCTION at (2)"
(add NAG f95 to the list of compilers)
This is a bug in gfortran; an extended example is shown below.
subroutine len(c)
implicit none
character :: c
c = "X"
end subroutine len
subroutine test()
implicit none
character :: str
external len
call len(str)
if(str /= "X") call abort()
end subroutine test
PROGRAM VAL
implicit none
external test
intrinsic len
call test()
if(len(" ") /= 1) call abort()
END
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Known to fail| |4.3.0 4.2.0 4.1.3
Last reconfirmed|0000-00-00 00:00:00 |2007-05-30 16:58:58
date| |
Summary|Can a subroutine have the |intrinsic function name
|same name as an intrinsic |conflicts with subroutine if
|function? |present in the same file
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32157