2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78500
* expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
* interface.c (matching_typebound_op): Ditto.
2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78500
* gfortran.dg/class_result_4.f90: New test.
From-SVN: r242846
+2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78500
+ * expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
+ * interface.c (matching_typebound_op): Ditto.
+
2016-11-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78297
component. Note that (normal) assignment to procedure pointers is not
possible. */
check_intentin = !own_scope;
- ptr_component = (sym->ts.type == BT_CLASS && CLASS_DATA (sym))
+ ptr_component = (sym->ts.type == BT_CLASS && sym->ts.u.derived
+ && CLASS_DATA (sym))
? CLASS_DATA (sym)->attr.class_pointer : sym->attr.pointer;
for (ref = e->ref; ref && check_intentin; ref = ref->next)
{
if (base->expr->ts.type == BT_CLASS)
{
- if (CLASS_DATA (base->expr) == NULL
+ if (!base->expr->ts.u.derived || CLASS_DATA (base->expr) == NULL
|| !gfc_expr_attr (base->expr).class_ok)
continue;
derived = CLASS_DATA (base->expr)->ts.u.derived;
+2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78500
+ * gfortran.dg/class_result_4.f90: New test.
+
2016-11-24 James Greenhalgh <james.greenhalgh@arm.com>
* gcc.target/aarch64/_Float16_1.c: New.
--- /dev/null
+! { dg-do compile }
+! PR fortran/78500
+class(t) function f() ! { dg-error "must be dummy, allocatable or pointer" }
+ f = 1 ! { dg-error "variable must not be polymorphic" }
+end
+