diff options
author | Thomas Koenig <Thomas.Koenig@online.de> | 2005-06-09 19:43:27 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2005-06-09 19:43:27 +0000 |
commit | 92f5e87c2ba9b5f83b8b465a43e43d41a2801265 (patch) | |
tree | 0f31fdfb3c3dd3af7b89a407ebda9e2ea89c4f54 /libgfortran | |
parent | 8562f05c95361a5a232e19ca6871c9cf6dcc4749 (diff) | |
download | gcc-92f5e87c2ba9b5f83b8b465a43e43d41a2801265.zip gcc-92f5e87c2ba9b5f83b8b465a43e43d41a2801265.tar.gz gcc-92f5e87c2ba9b5f83b8b465a43e43d41a2801265.tar.bz2 |
re PR fortran/21480 ([4.0 only] trivial reshape operation gives erroneous results)
2005-06-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21480
* m4/reshape.m4: Use sizeof (rtype_name) for sizes to be passed
to reshape_packed.
* generated/reshape_c4.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
2005-06-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21480
* gfortran.dg/reshape-complex.f90: Add a test for a packed
complex array.
From-SVN: r100805
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 10 | ||||
-rw-r--r-- | libgfortran/generated/reshape_c4.c | 6 | ||||
-rw-r--r-- | libgfortran/generated/reshape_c8.c | 6 | ||||
-rw-r--r-- | libgfortran/generated/reshape_i4.c | 6 | ||||
-rw-r--r-- | libgfortran/generated/reshape_i8.c | 6 | ||||
-rw-r--r-- | libgfortran/m4/reshape.m4 | 6 |
6 files changed, 25 insertions, 15 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index ac9fce5..86a04e8 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,13 @@ +2005-06-09 Thomas Koenig <Thomas.Koenig@online.de> + + PR libfortran/21480 + * m4/reshape.m4: Use sizeof (rtype_name) for sizes to be passed + to reshape_packed. + * generated/reshape_c4.c: Regenerated. + * generated/reshape_c8.c: Regenerated. + * generated/reshape_i4.c: Regenerated. + * generated/reshape_i8.c: Regenerated. + 2005-06-07 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/21926 diff --git a/libgfortran/generated/reshape_c4.c b/libgfortran/generated/reshape_c4.c index 02d73d2..4a9c14d 100644 --- a/libgfortran/generated/reshape_c4.c +++ b/libgfortran/generated/reshape_c4.c @@ -174,9 +174,9 @@ reshape_c4 (gfc_array_c4 * ret, gfc_array_c4 * source, shape_type * shape, if (rsize != 0 && ssize != 0 && psize != 0) { - rsize *= 4; - ssize *= 4; - psize *= 4; + rsize *= sizeof (GFC_COMPLEX_4); + ssize *= sizeof (GFC_COMPLEX_4); + psize *= sizeof (GFC_COMPLEX_4); reshape_packed ((char *)ret->data, rsize, (char *)source->data, ssize, pad ? (char *)pad->data : NULL, psize); return; diff --git a/libgfortran/generated/reshape_c8.c b/libgfortran/generated/reshape_c8.c index e6ddf1a..c12735a 100644 --- a/libgfortran/generated/reshape_c8.c +++ b/libgfortran/generated/reshape_c8.c @@ -174,9 +174,9 @@ reshape_c8 (gfc_array_c8 * ret, gfc_array_c8 * source, shape_type * shape, if (rsize != 0 && ssize != 0 && psize != 0) { - rsize *= 8; - ssize *= 8; - psize *= 8; + rsize *= sizeof (GFC_COMPLEX_8); + ssize *= sizeof (GFC_COMPLEX_8); + psize *= sizeof (GFC_COMPLEX_8); reshape_packed ((char *)ret->data, rsize, (char *)source->data, ssize, pad ? (char *)pad->data : NULL, psize); return; diff --git a/libgfortran/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c index b90e56c..465ca24 100644 --- a/libgfortran/generated/reshape_i4.c +++ b/libgfortran/generated/reshape_i4.c @@ -174,9 +174,9 @@ reshape_4 (gfc_array_i4 * ret, gfc_array_i4 * source, shape_type * shape, if (rsize != 0 && ssize != 0 && psize != 0) { - rsize *= 4; - ssize *= 4; - psize *= 4; + rsize *= sizeof (GFC_INTEGER_4); + ssize *= sizeof (GFC_INTEGER_4); + psize *= sizeof (GFC_INTEGER_4); reshape_packed ((char *)ret->data, rsize, (char *)source->data, ssize, pad ? (char *)pad->data : NULL, psize); return; diff --git a/libgfortran/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c index 38532c1..41a25ff 100644 --- a/libgfortran/generated/reshape_i8.c +++ b/libgfortran/generated/reshape_i8.c @@ -174,9 +174,9 @@ reshape_8 (gfc_array_i8 * ret, gfc_array_i8 * source, shape_type * shape, if (rsize != 0 && ssize != 0 && psize != 0) { - rsize *= 8; - ssize *= 8; - psize *= 8; + rsize *= sizeof (GFC_INTEGER_8); + ssize *= sizeof (GFC_INTEGER_8); + psize *= sizeof (GFC_INTEGER_8); reshape_packed ((char *)ret->data, rsize, (char *)source->data, ssize, pad ? (char *)pad->data : NULL, psize); return; diff --git a/libgfortran/m4/reshape.m4 b/libgfortran/m4/reshape.m4 index 6b411f0..ae26a88 100644 --- a/libgfortran/m4/reshape.m4 +++ b/libgfortran/m4/reshape.m4 @@ -176,9 +176,9 @@ reshape_`'rtype_ccode (rtype * ret, rtype * source, shape_type * shape, if (rsize != 0 && ssize != 0 && psize != 0) { - rsize *= rtype_kind; - ssize *= rtype_kind; - psize *= rtype_kind; + rsize *= sizeof (rtype_name); + ssize *= sizeof (rtype_name); + psize *= sizeof (rtype_name); reshape_packed ((char *)ret->data, rsize, (char *)source->data, ssize, pad ? (char *)pad->data : NULL, psize); return; |