Regression: import clashes with generic

Damian Rouson damian@rouson.net
Tue Aug 7 15:37:00 GMT 2012


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



More information about the Fortran mailing list