diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-06 19:39:35 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-06 19:39:35 +0000 |
commit | 6711b3456855467480365f2d6c85ca972aa59312 (patch) | |
tree | 8b0bc4b792df0ef1c7fe0fe416ee86e3b65b1255 /libgfortran/runtime | |
parent | a027f9e14d1ec71d7df98a9bab8e9e306fcdab5b (diff) | |
download | gcc-6711b3456855467480365f2d6c85ca972aa59312.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195814 138bc75d-0d04-0410-961f-82ee72b054a4
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 34b55033caf..330f0f425db 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) |