+2018-10-18 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/58618
+ * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
+ initialization with NULL() of a deferred length pointer.
+
2018-10-17 Tobias Burnus <burnus@net-b.de>
PR fortran/87632
gfc_finish_var_decl (length, sym);
if (!sym->attr.associate_var
&& TREE_CODE (length) == VAR_DECL
- && sym->value && sym->value->ts.u.cl->length)
+ && sym->value && sym->value->expr_type != EXPR_NULL
+ && sym->value->ts.u.cl->length)
{
gfc_expr *len = sym->value->ts.u.cl->length;
DECL_INITIAL (length) = gfc_conv_initializer (len, &len->ts,
DECL_INITIAL (length));
}
else
- gcc_assert (!sym->value);
+ gcc_assert (!sym->value || sym->value->expr_type == EXPR_NULL);
}
gfc_finish_var_decl (decl, sym);
+2018-10-18 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/58618
+ * gfortran.dg/deferred_character_30.f90 : New test.
+
2018-10-18 Richard Biener <rguenther@suse.de>
PR middle-end/87087
--- /dev/null
+! { dg-do compile }
+!
+! Fix a regression introduced by the patch for PR70149.
+!
+ character (:), pointer :: ptr => NULL() ! The NULL () caused an ICE.
+ character (6), target :: tgt = 'lmnopq'
+ ptr => tgt
+ print *, len (ptr), ptr
+end