This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32157] intrinsic function name conflicts with subroutine if present in the same file



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]