This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Regression: import clashes with generic


The code below compiles with gfortran 4.7.1 but not with 4.8.
Commenting out the "import" statement eliminates the compile-time
error.   Is this a known issue or should I submit a bug report?

Damian

$ cat import_clashes_with_generic.f90
module import_clashes_with_generic

  type ,abstract :: foo
  contains
    procedure :: unary
    generic :: operator(-) => unary
  end type

  abstract interface
    integer function bar()
      import :: foo
    end function
  end interface

contains

  integer function unary(rhs)
    class(foo) ,intent(in) :: rhs
  end function

end module

$ gfortran-mp-4.8 -c import_clashes_with_generic.f90
import_clashes_with_generic.f90:6.29:

    generic :: operator(-) => unary
                             1
Error: Entity 'unary' at (1) is already present in the interface


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