Commit 5cd2f815 by Janus Weil

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
parent b074e783
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>
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
all DEFERRED bindings are overridden. */
if (super_type && super_type->attr.abstract && !sym->attr.abstract
&& !sym->attr.is_class
&& ensure_not_abstract (sym, super_type) == FAILURE)
return FAILURE;
......
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>
* g++.dg/cpp0x/noexcept08.C: New.
......
! { 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" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment