------- 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

Reply via email to