+2011-05-21 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/48699
+ * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
+ selector is ALLOCATABLE.
+
2011-05-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/48706
gfc_get_sym_tree (name, gfc_current_ns, &tmp, false);
gfc_add_type (tmp->n.sym, ts, NULL);
gfc_set_sym_referenced (tmp->n.sym);
- gfc_add_pointer (&tmp->n.sym->attr, NULL);
+ if (select_type_stack->selector->ts.type == BT_CLASS &&
+ CLASS_DATA (select_type_stack->selector)->attr.allocatable)
+ gfc_add_allocatable (&tmp->n.sym->attr, NULL);
+ else
+ gfc_add_pointer (&tmp->n.sym->attr, NULL);
gfc_add_flavor (&tmp->n.sym->attr, FL_VARIABLE, name, NULL);
if (ts->type == BT_CLASS)
gfc_build_class_symbol (&tmp->n.sym->ts, &tmp->n.sym->attr,
+2011-05-21 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/48699
+ * gfortran.dg/select_type_23.f03: New.
+
2011-05-20 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/defaulted26.C: New.
--- /dev/null
+! { dg-do compile }
+!
+! PR 48699: [OOP] MOVE_ALLOC inside SELECT TYPE
+!
+! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
+
+program testmv2
+
+ type bar
+ integer, allocatable :: ia(:), ja(:)
+ end type bar
+
+ class(bar), allocatable :: sm,sm2
+
+ allocate(sm2)
+
+ select type(sm2)
+ type is (bar)
+ call move_alloc(sm2,sm)
+ end select
+
+end program testmv2