http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46196

           Summary: [OOP] gfortran compiles invalid generic TBP: dummy
                    arguments are type compatible
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: boschm...@tp1.physik.uni-siegen.de


module generic
  type :: a_type
   contains
     procedure :: a_subroutine
  end type a_type
  type,extends(a_type) :: b_type
   contains
     procedure :: b_subroutine
     generic :: g_sub => a_subroutine,b_subroutine
  end type b_type
contains
  subroutine a_subroutine(this)
    class(a_type)::this
  end subroutine a_subroutine
  subroutine b_subroutine(this)
    class(b_type)::this
  end subroutine b_subroutine
end module generic

GNU Fortran (GCC) 4.6.0 20101022 (experimental)

This code is invalid, because the dummy arguments in a_subroutine and
b_subroutine are type compatible. Therefore they must not share a generic
interface.

Reply via email to