+2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ * resolve.c (resolve_symbol): Add unimplemented message for
+ polymorphic types with allocatable/pointer components and coarray=lib.
+
2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
* trans-intrinsic.c: Include memmodel.h.
(just like derived type declaration symbols have flavor FL_DERIVED). */
gcc_assert (sym->ts.type != BT_UNION);
+ /* Coarrayed polymorphic objects with allocatable or pointer components are
+ yet unsupported for -fcoarray=lib. */
+ if (flag_coarray == GFC_FCOARRAY_LIB && sym->ts.type == BT_CLASS
+ && sym->ts.u.derived && CLASS_DATA (sym)
+ && CLASS_DATA (sym)->attr.codimension
+ && (sym->ts.u.derived->attr.alloc_comp
+ || sym->ts.u.derived->attr.pointer_comp))
+ {
+ gfc_error ("Sorry, allocatable/pointer components in polymorphic (CLASS) "
+ "type coarrays at %L are unsupported", &sym->declared_at);
+ return;
+ }
+
if (sym->attr.artificial)
return;
+2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ * gfortran.dg/coarray_38.f90: Expect error message.
+
2016-10-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/spellcheck_1.c: New test.
type t2
class(t), allocatable :: caf2[:]
end type t2
-class(t), allocatable :: caf[:]
+class(t), allocatable :: caf[:] ! { dg-error "Sorry, allocatable/pointer components in polymorphic" }
type(t) :: x
type(t2) :: y