diff options
author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-04 19:27:29 +0000 |
---|---|---|
committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-04 19:27:29 +0000 |
commit | a965f64afc2f9cd327c7bfb61c3d6dda8b7acd20 (patch) | |
tree | f997c7996452c6a047a1c132b79457094d5ea30b /libgfortran/runtime | |
parent | bc868c0b87a97bd3136f417e6feb6d39bd5a05aa (diff) | |
download | gcc-a965f64afc2f9cd327c7bfb61c3d6dda8b7acd20.tar.gz |
PR fortran/17283
fortran/
* iresolve.c (gfc_resolve_pack): Choose function depending if mask is
scalar.
libgfortran/
* intrinsics/pack_generic.c (__pack): Allocate memory for return array
if not done by caller.
(__pack_s): New function.
* runtime/memory.c (internal_malloc, internal_malloc64): Allow
allocating zero memory.
testsuite/
* gfortran.fortran-torture/execute/intrinsic_pack.f90: Add more tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88526 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r-- | libgfortran/runtime/memory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/runtime/memory.c b/libgfortran/runtime/memory.c index ca5eb15244b..5b146000b8d 100644 --- a/libgfortran/runtime/memory.c +++ b/libgfortran/runtime/memory.c @@ -165,8 +165,8 @@ internal_malloc (GFC_INTEGER_4 size) { #ifdef GFC_CHECK_MEMORY /* Under normal circumstances, this is _never_ going to happen! */ - if (size <= 0) - runtime_error ("Attempt to allocate a non-positive amount of memory."); + if (size < 0) + runtime_error ("Attempt to allocate a negative amount of memory."); #endif return internal_malloc_size ((size_t) size); @@ -178,8 +178,8 @@ internal_malloc64 (GFC_INTEGER_8 size) { #ifdef GFC_CHECK_MEMORY /* Under normal circumstances, this is _never_ going to happen! */ - if (size <= 0) - runtime_error ("Attempt to allocate a non-positive amount of memory."); + if (size < 0) + runtime_error ("Attempt to allocate a negative amount of memory."); #endif return internal_malloc_size ((size_t) size); } |