mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-15 04:00:26 +08:00
re PR fortran/54195 ([OOP] IMPORT fails with GENERIC TBP: "is already present in the interface")
fortran/ PR fortran/54195 * resolve.c (resolve_typebound_procedures): Recurse through resolve_symbol. testsuite/ PR fortran/54195 * gfortran.dg/typebound_operator_19.f90: New test. * gfortran.dg/typebound_assignment_4.f90: New test. From-SVN: r195730
This commit is contained in:
parent
4af8d042f8
commit
49c8d79b27
@ -1,3 +1,9 @@
|
||||
2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/54195
|
||||
* resolve.c (resolve_typebound_procedures): Recurse through
|
||||
resolve_symbol.
|
||||
|
||||
2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/54107
|
||||
|
@ -12344,7 +12344,7 @@ resolve_typebound_procedures (gfc_symbol* derived)
|
||||
|
||||
super_type = gfc_get_derived_super_type (derived);
|
||||
if (super_type)
|
||||
resolve_typebound_procedures (super_type);
|
||||
resolve_symbol (super_type);
|
||||
|
||||
resolve_bindings_derived = derived;
|
||||
resolve_bindings_result = SUCCESS;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/54195
|
||||
* gfortran.dg/typebound_operator_19.f90: New test.
|
||||
* gfortran.dg/typebound_assignment_4.f90: New test.
|
||||
|
||||
2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/54107
|
||||
|
35
gcc/testsuite/gfortran.dg/typebound_assignment_4.f90
Normal file
35
gcc/testsuite/gfortran.dg/typebound_assignment_4.f90
Normal file
@ -0,0 +1,35 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/54195
|
||||
! The compiler used to diagnose a duplicate entity in the assignment interface
|
||||
! because NC was resolved twice.
|
||||
!
|
||||
! Contributed by Andrew Benson <abenson@obs.carnegiescience.edu>
|
||||
|
||||
module gn
|
||||
|
||||
implicit none
|
||||
|
||||
type :: nc
|
||||
contains
|
||||
procedure :: assign => nca
|
||||
generic :: assignment(=) => assign
|
||||
end type
|
||||
|
||||
type, extends(nc) :: ncb
|
||||
contains
|
||||
procedure , nopass :: tis => bf
|
||||
end type
|
||||
|
||||
contains
|
||||
|
||||
subroutine nca(to,from)
|
||||
class(nc), intent(out) :: to
|
||||
type(nc), intent(in) :: from
|
||||
end subroutine
|
||||
|
||||
logical function bf()
|
||||
bf=.false.
|
||||
end function
|
||||
|
||||
end module
|
29
gcc/testsuite/gfortran.dg/typebound_operator_19.f90
Normal file
29
gcc/testsuite/gfortran.dg/typebound_operator_19.f90
Normal file
@ -0,0 +1,29 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/54195
|
||||
! The compiler used to diagnose a duplicate entity in the assignment interface
|
||||
! because NC was resolved twice.
|
||||
!
|
||||
! Contributed by Damian Rouson <damian@rouson.net>
|
||||
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user