From c362c6741d4511d76d00b3c7c732838539c11a75 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 6 Feb 2013 20:39:35 +0100 Subject: re PR fortran/55978 (class_optional_2.f90 -Os fails) 2013-02-06 Janus Weil PR fortran/55978 * runtime/in_pack_generic.c (internal_pack): Return if base_addr is NULL. 2013-02-06 Janus Weil PR fortran/55978 * gfortran.dg/class_optional_2.f90: Uncomment some cases which work now. From-SVN: r195814 --- libgfortran/runtime/in_pack_generic.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libgfortran/runtime') diff --git a/libgfortran/runtime/in_pack_generic.c b/libgfortran/runtime/in_pack_generic.c index 34b5503..330f0f4 100644 --- a/libgfortran/runtime/in_pack_generic.c +++ b/libgfortran/runtime/in_pack_generic.c @@ -48,6 +48,9 @@ internal_pack (gfc_array_char * source) index_type size; index_type type_size; + if (source->base_addr == NULL) + return NULL; + type_size = GFC_DTYPE_TYPE_SIZE(source); size = GFC_DESCRIPTOR_SIZE (source); switch (type_size) -- cgit v1.1