diff options
author | Janus Weil <janus@gcc.gnu.org> | 2013-02-06 19:39:35 +0000 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2013-02-06 19:39:35 +0000 |
commit | 63b85412ca17af4923bed7e68c9e8aeff7f2dd08 (patch) | |
tree | 8b0bc4b792df0ef1c7fe0fe416ee86e3b65b1255 /libgfortran | |
parent | 33a6193b594badf6931fc2e11e4e8e3c932cf235 (diff) |
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: https://gcc.gnu.org/svn/gcc/trunk@195814 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/runtime/in_pack_generic.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index d4ccff4f2a6..1a42a8449a9 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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-01-23 Janne Blomqvist <jb@gcc.gnu.org> * io/file_pos.c (unformatted_backspace): Use __builtin_bswapXX 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) |