Janus Weil <janus@gcc.gnu.org>
PR fortran/41556
PR fortran/41937
* interface.c (gfc_check_operator_interface): Handle CLASS arguments.
* resolve.c (resolve_allocate_expr): Handle allocatable components of
CLASS variables.
2009-11-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/41556
PR fortran/41937
* gfortran.dg/class_11.f03: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153911
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-11-04 Tobias Burnus <burnus@gcc.gnu.org>
+ Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/41556
+ PR fortran/41937
+ * interface.c (gfc_check_operator_interface): Handle CLASS arguments.
+ * resolve.c (resolve_allocate_expr): Handle allocatable components of
+ CLASS variables.
+
2009-11-04 Richard Guenther <rguenther@suse.de>
* options.c (gfc_post_options): Rely on common code processing
- Types and kinds do not conform, and
- First argument is of derived type. */
if (sym->formal->sym->ts.type != BT_DERIVED
+ && sym->formal->sym->ts.type != BT_CLASS
&& (r1 == 0 || r1 == r2)
&& (sym->formal->sym->ts.type == sym->formal->next->sym->ts.type
|| (gfc_numeric_ts (&sym->formal->sym->ts)
sym = a->expr->symtree->n.sym;
/* TODO - check derived type components. */
- if (sym->ts.type == BT_DERIVED)
+ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
continue;
if ((ar->start[i] != NULL
+2009-11-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/41556
+ PR fortran/41937
+ * gfortran.dg/class_11.f03: New test.
+
2009-11-04 Jason Merrill <jason@redhat.com>
PR c++/35067
--- /dev/null
+! { dg-do compile }
+!
+! PR 41556
+! Contributed by Damian Rouson <damian@rouson.net>
+
+ implicit none
+
+ type ,abstract :: object
+ contains
+ procedure(assign_interface) ,deferred :: assign
+ generic :: assignment(=) => assign
+ end type
+
+ abstract interface
+ subroutine assign_interface(lhs,rhs)
+ import :: object
+ class(object) ,intent(inout) :: lhs
+ class(object) ,intent(in) :: rhs
+ end subroutine
+ end interface
+
+! PR 41937
+! Contributed by Juergen Reuter <reuter@physik.uni-freiburg.de>
+
+ type, abstract :: cuba_abstract_type
+ integer :: dim_f = 1
+ real, dimension(:), allocatable :: integral
+ end type cuba_abstract_type
+
+contains
+
+ subroutine cuba_abstract_alloc_dim_f(this)
+ class(cuba_abstract_type) :: this
+ allocate(this%integral(this%dim_f))
+ end subroutine cuba_abstract_alloc_dim_f
+
+end