aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authortoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-29 22:50:45 +0000
committertoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-29 22:50:45 +0000
commit4885586dbabeb4ce0faff7eeead0d66d50607b7f (patch)
tree50675d3ad7c51014359b6632837b478040af3397 /libgfortran
parentb5a03a9cb576b21ffec3c92868cad727665c29a2 (diff)
2003-10-29 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/12703 * runtime/memory.c (allocate_size): Allow allocation of zero-sized objects. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/runtime/memory.c8
2 files changed, 6 insertions, 8 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index ba764cda779..f30be4d5578 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,11 @@
2003-10-29 Toon Moene <toon@moene.indiv.nluug.nl>
+ PR fortran/12703
+ * runtime/memory.c (allocate_size): Allow allocation
+ of zero-sized objects.
+
+2003-10-29 Toon Moene <toon@moene.indiv.nluug.nl>
+
PR fortran/12701
* open.c (new_unit): Open without a file name opens
a file with name fort.<unit>.
diff --git a/libgfortran/runtime/memory.c b/libgfortran/runtime/memory.c
index d02404c2e18..5ed77eb4a24 100644
--- a/libgfortran/runtime/memory.c
+++ b/libgfortran/runtime/memory.c
@@ -267,14 +267,6 @@ allocate_size (void **mem, size_t size, GFC_INTEGER_4 * stat)
{
malloc_t *newmem;
- /* Don't try to allocate 0 bytes. Should never happen anyway. */
-
- if (size == 0)
- {
- runtime_error ("ALLOCATE: Cannot allocate 0 bytes.");
- abort ();
- }
-
if (!mem)
runtime_error ("Internal: NULL mem pointer in ALLOCATE.");