diff options
author | Janus Weil <janus@gcc.gnu.org> | 2013-02-06 20:39:35 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2013-02-06 20:39:35 +0100 |
commit | c362c6741d4511d76d00b3c7c732838539c11a75 (patch) | |
tree | 8b0bc4b792df0ef1c7fe0fe416ee86e3b65b1255 /libgfortran/runtime | |
parent | 8f093ea0b10ca377258edea550f799a45d9a7aa3 (diff) | |
download | gcc-c362c6741d4511d76d00b3c7c732838539c11a75.zip gcc-c362c6741d4511d76d00b3c7c732838539c11a75.tar.gz gcc-c362c6741d4511d76d00b3c7c732838539c11a75.tar.bz2 |
re PR fortran/55978 (class_optional_2.f90 -Os fails)
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* runtime/in_pack_generic.c (internal_pack): Return if base_addr is
NULL.
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* gfortran.dg/class_optional_2.f90: Uncomment some cases which work now.
From-SVN: r195814
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r-- | libgfortran/runtime/in_pack_generic.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |