This is the mail archive of the gcc-patches@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]

Re: [Patch, fortran] PR20880 - Failure to detect procedures encompassing own interface


> 2006-11-23 Paul Thomas  <pault@gcc.gnu.org>
>    PR fortran/20880

Hi!
This patch causes compile-time regression on SPEC cpu2006/481.wrf at {x86_64|i686|ia64}-redhat-linux. The patch detects ambiguity when two different modules contains same function name. Minimal reproducer is below.


My Fortran Standard knowledge is superficial to provide an opinion, but Intel Fortran compiler passes this code through.

Is this new behavior correct or not?

Thanks.
- Grigory

$ cat module_mp_ncloud3.f90
MODULE module_mp_ncloud3
CONTAINS
      real function fpvs()
      fpvs=1.0
      END FUNCTION fpvs
END MODULE module_mp_ncloud3

$ cat module_mp_ncloud5.f90
MODULE module_mp_ncloud5
CONTAINS
      real function fpvs()
      fpvs=1.0
      END FUNCTION fpvs
END MODULE module_mp_ncloud5

$ cat module_physics_init.f90
MODULE module_physics_init
   USE module_mp_ncloud3
   USE module_mp_ncloud5
END MODULE module_physics_init

$ gfortran -c *.f90
module_physics_init.f90:2.24:

   USE module_mp_ncloud3
                       1
Error: Procedure fpvs at (1) is ambiguous


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