summaryrefslogtreecommitdiffstats
path: root/libgfortran/m4/in_pack.m4
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-11 19:39:13 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-11 19:39:13 +0000
commitf27ef64358c7b216ba0a11142364436a0aaebc33 (patch)
treeaad494096555f7a4cc32786401cfade71ce1dc21 /libgfortran/m4/in_pack.m4
parente5897c9259ebb0cfbb7fc82e9eeb3a95adcd4842 (diff)
downloadppe42-gcc-f27ef64358c7b216ba0a11142364436a0aaebc33.tar.gz
ppe42-gcc-f27ef64358c7b216ba0a11142364436a0aaebc33.zip
2005-06-11 Thomas Koenig <Thomas.Koenig@onlinde.de>
PR libfortran/21333 * Makefile.am: Add in_pack_c4.c, in_pack_c8.c, in_unpack_c4.c and in_unpack_c8.c. * Makefile.in: Regenerate. * libgfortran.h: Declare internal_pack_c4, internal_pack_c8, internal_unpack_c4 and internal_unpack_c8. * m4/in_pack.m4: Use rtype_ccode insteald of rtype_kind in function name. Use sizeof (rtype_name) as size for memory allocation. * m4/in_unpack.m4: Use rtype_ccode insteald of rtype_kind in function name. Use sizeof (rtype_name) for calculation of sizes for memcpy. * runtime/in_pack_generic.c: For real, integer and logical call internal_pack_4 if size==4 and internal_pack_8 if size==8. For complex, call internal_pack_c4 if size==8 and internal_pack_c8 if size==16. * runtime/in_unpack_generic.c: For real, integer and logical call internal_unpack_4 if size==4 and internal_unpack_8 if size==8. For complex, call internal_unpack_c4 if size==8 and internal_unpack_c8 if size==16. * generated/in_pack_i4.c: Regenerated. * generated/in_pack_i8.c: Regenerated. * generated/in_unpack_i4.c: Regenerated. * generated/in_unpack_i8.c: Regenerated. * generated/in_pack_c4.c: New file. * generated/in_pack_c8.c: New file. * generated/in_unpack_c4.c: New file. * generated/in_unpack_c8.c: New file. 2005-05-11 Thomas Koenig <Thomas.Koenig@online.de> * gfortran.fortran-torture/execute/in-pack.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100842 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/m4/in_pack.m4')
-rw-r--r--libgfortran/m4/in_pack.m47
1 files changed, 4 insertions, 3 deletions
diff --git a/libgfortran/m4/in_pack.m4 b/libgfortran/m4/in_pack.m4
index b2eac40581f..819cb3e2c33 100644
--- a/libgfortran/m4/in_pack.m4
+++ b/libgfortran/m4/in_pack.m4
@@ -37,9 +37,10 @@ include(iparm.m4)dnl
/* Allocates a block of memory with internal_malloc if the array needs
repacking. */
-dnl Only the kind (ie size) is used to name the function.
+dnl The kind (ie size) is used to name the function for logicals, integers
+dnl and reals. For complex, it's c4 or c8.
rtype_name *
-`internal_pack_'rtype_kind (rtype * source)
+`internal_pack_'rtype_ccode (rtype * source)
{
index_type count[GFC_MAX_DIMENSIONS];
index_type extent[GFC_MAX_DIMENSIONS];
@@ -84,7 +85,7 @@ rtype_name *
return source->data;
/* Allocate storage for the destination. */
- destptr = (rtype_name *)internal_malloc_size (ssize * rtype_kind);
+ destptr = (rtype_name *)internal_malloc_size (ssize * sizeof (rtype_name));
dest = destptr;
src = source->data;
stride0 = stride[0];
OpenPOWER on IntegriCloud