PR fortran/47789
* primary.c (gfc_match_structure_constructor): Handle empty parent
types.
2011-02-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/47789
* gfortran.dg/derived_constructor_comps_4.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170291
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-02-18 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/47789
+ * primary.c (gfc_match_structure_constructor): Handle empty parent
+ types.
+
2011-02-18 Tobias Burnus
PR fortran/47775
{
gfc_component *this_comp = NULL;
+ if (comp == sym->components && sym->attr.extension
+ && comp->ts.type == BT_DERIVED
+ && comp->ts.u.derived->attr.zero_comp)
+ /* Skip empty parents. */
+ comp = comp->next;
+
if (!comp_head)
comp_tail = comp_head = gfc_get_structure_ctor_component ();
else
+2011-02-18 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/47789
+ * gfortran.dg/derived_constructor_comps_4.f90: New.
+
2011-02-18 Tobias Burnus
PR fortran/47775
--- /dev/null
+! { dg-do run }
+!
+! PR 47789: [F03] Structure constructor of type extending DT with no components
+!
+! Contributed by eddyg_61-bugzilla@yahoo.it
+
+type:: one
+end type
+
+type, extends(one) :: two
+ integer :: a
+end type
+
+type(two) :: wo = two(6)
+
+if (wo%a /= 6) call abort()
+
+end