Commit 17643884 by Janus Weil

re PR fortran/46344 ([OOP] ICE with allocatable CLASS components)

2010-11-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46344
	* decl.c (build_struct): Build vtab immediately if derived type
	has already been declared.

2010-11-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46344
	* gfortran.dg/class_28.f03: Extended.

From-SVN: r166458
parent d36dba07
2010-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/46344
* decl.c (build_struct): Build vtab immediately if derived type
has already been declared.
2010-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/46344
* trans-types.c (gfc_copy_dt_decls_ifequal): Handle CLASS components.
2010-11-06 Janus Weil <janus@gcc.gnu.org>
......
......@@ -1629,7 +1629,13 @@ build_struct (const char *name, gfc_charlen *cl, gfc_expr **init,
scalar:
if (c->ts.type == BT_CLASS)
gfc_build_class_symbol (&c->ts, &c->attr, &c->as, true);
{
bool delayed = (gfc_state_stack->sym == c->ts.u.derived)
|| (!c->ts.u.derived->components
&& !c->ts.u.derived->attr.zero_comp);
gfc_build_class_symbol (&c->ts, &c->attr, &c->as, delayed);
}
return t;
}
......
2010-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/46344
* gfortran.dg/class_28.f03: Extended.
2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/dotsyntax-13.m: New.
......
......@@ -17,6 +17,21 @@ module m
end module m
module m2
type t1
end type
type t2
class(t1), allocatable :: c
end type
type(t1) :: w
end module m2
program p
use m
implicit none
......@@ -27,4 +42,4 @@ program p
end program p
! { dg-final { cleanup-modules "m" } }
! { dg-final { cleanup-modules "m m2" } }
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