re PR fortran/44616 ([OOP] ICE if CLASS(foo) is used before its definition)
2010-06-22 Janus Weil <janus@gcc.gnu.org> PR fortran/44616 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class containers. 2010-06-22 Janus Weil <janus@gcc.gnu.org> PR fortran/44616 * gfortran.dg/abstract_type_8.f03: New. From-SVN: r161208
This commit is contained in:
parent
b074e7833b
commit
5cd2f8152d
@ -1,3 +1,9 @@
|
|||||||
|
2010-06-22 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/44616
|
||||||
|
* resolve.c (resolve_fl_derived): Avoid checking for abstract on class
|
||||||
|
containers.
|
||||||
|
|
||||||
2010-06-21 Tobias Burnus <burnus@net-b.de>
|
2010-06-21 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/40632
|
PR fortran/40632
|
||||||
|
@ -11144,6 +11144,7 @@ resolve_fl_derived (gfc_symbol *sym)
|
|||||||
/* If this is a non-ABSTRACT type extending an ABSTRACT one, ensure that
|
/* If this is a non-ABSTRACT type extending an ABSTRACT one, ensure that
|
||||||
all DEFERRED bindings are overridden. */
|
all DEFERRED bindings are overridden. */
|
||||||
if (super_type && super_type->attr.abstract && !sym->attr.abstract
|
if (super_type && super_type->attr.abstract && !sym->attr.abstract
|
||||||
|
&& !sym->attr.is_class
|
||||||
&& ensure_not_abstract (sym, super_type) == FAILURE)
|
&& ensure_not_abstract (sym, super_type) == FAILURE)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2010-06-22 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/44616
|
||||||
|
* gfortran.dg/abstract_type_8.f03: New.
|
||||||
|
|
||||||
2010-06-21 Jason Merrill <jason@redhat.com>
|
2010-06-21 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
* g++.dg/cpp0x/noexcept08.C: New.
|
* g++.dg/cpp0x/noexcept08.C: New.
|
||||||
|
29
gcc/testsuite/gfortran.dg/abstract_type_8.f03
Normal file
29
gcc/testsuite/gfortran.dg/abstract_type_8.f03
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
! { dg-do compile }
|
||||||
|
!
|
||||||
|
! PR 44616: [OOP] ICE if CLASS(foo) is used before its definition
|
||||||
|
!
|
||||||
|
! Contributed by bd satish <bdsatish@gmail.com>
|
||||||
|
|
||||||
|
module factory_pattern
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
type First_Factory
|
||||||
|
character(len=20) :: factory_type
|
||||||
|
class(Connection), pointer :: connection_type
|
||||||
|
contains
|
||||||
|
end type First_Factory
|
||||||
|
|
||||||
|
type, abstract :: Connection
|
||||||
|
contains
|
||||||
|
procedure(generic_desc), deferred :: description
|
||||||
|
end type Connection
|
||||||
|
|
||||||
|
abstract interface
|
||||||
|
subroutine generic_desc(self)
|
||||||
|
import ! Required, cf. PR 44614
|
||||||
|
class(Connection) :: self
|
||||||
|
end subroutine generic_desc
|
||||||
|
end interface
|
||||||
|
end module factory_pattern
|
||||||
|
|
||||||
|
! { dg-final { cleanup-modules "factory_pattern" } }
|
Loading…
Reference in New Issue
Block a user