diff options
author | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-07 20:46:17 +0000 |
---|---|---|
committer | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-07 20:46:17 +0000 |
commit | e967d28c5344129092a8629b510726d56c440820 (patch) | |
tree | fb2ff4924c094e8ef8e3cd32eee95a36428e940f /libgfortran/generated | |
parent | 7ee606dd508cedf07c79f4871911dbbbeb2e9440 (diff) | |
download | gcc-e967d28c5344129092a8629b510726d56c440820.tar.gz |
2005-06-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21926
* m4/matmul.m4: Correct zeroing of result for non-packed
arrays with lowest stride is one.
* generated/matmul_c4.c: Regenerated.
* generated/matmul_c8.c: Regenerated.
* generated/matmul_i4.c: Regenerated.
* generated/matmul_i8.c: Regenerated.
* generated/matmul_r4.c: Regenerated.
* generated/matmul_r8.c: Regenerated.
2005-06-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21926
* gfortran.fortran-torture/execute/intrinsic_matmul.f90:
Test case where the return array has lowest stride one,
but isn't packed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100721 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated')
-rw-r--r-- | libgfortran/generated/matmul_c4.c | 9 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c8.c | 9 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i4.c | 9 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i8.c | 9 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r4.c | 9 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r8.c | 9 |
6 files changed, 48 insertions, 6 deletions
diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c index 5eb8b44631b..c63d343ea82 100644 --- a/libgfortran/generated/matmul_c4.c +++ b/libgfortran/generated/matmul_c4.c @@ -178,7 +178,14 @@ matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b) GFC_COMPLEX_4 *abase_n; GFC_COMPLEX_4 bbase_yn; - memset (dest, 0, (sizeof (GFC_COMPLEX_4) * size0((array_t *) retarray))); + if (rystride == ycount) + memset (dest, 0, (sizeof (GFC_COMPLEX_4) * size0((array_t *) retarray))); + else + { + for (y = 0; y < ycount; y++) + for (x = 0; x < xcount; x++) + dest[x + y*rystride] = (GFC_COMPLEX_4)0; + } for (y = 0; y < ycount; y++) { diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c index 181f4c9cc4d..98326d135d8 100644 --- a/libgfortran/generated/matmul_c8.c +++ b/libgfortran/generated/matmul_c8.c @@ -178,7 +178,14 @@ matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b) GFC_COMPLEX_8 *abase_n; GFC_COMPLEX_8 bbase_yn; - memset (dest, 0, (sizeof (GFC_COMPLEX_8) * size0((array_t *) retarray))); + if (rystride == ycount) + memset (dest, 0, (sizeof (GFC_COMPLEX_8) * size0((array_t *) retarray))); + else + { + for (y = 0; y < ycount; y++) + for (x = 0; x < xcount; x++) + dest[x + y*rystride] = (GFC_COMPLEX_8)0; + } for (y = 0; y < ycount; y++) { diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c index f214ba5ec0c..9dde570b73a 100644 --- a/libgfortran/generated/matmul_i4.c +++ b/libgfortran/generated/matmul_i4.c @@ -178,7 +178,14 @@ matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b) GFC_INTEGER_4 *abase_n; GFC_INTEGER_4 bbase_yn; - memset (dest, 0, (sizeof (GFC_INTEGER_4) * size0((array_t *) retarray))); + if (rystride == ycount) + memset (dest, 0, (sizeof (GFC_INTEGER_4) * size0((array_t *) retarray))); + else + { + for (y = 0; y < ycount; y++) + for (x = 0; x < xcount; x++) + dest[x + y*rystride] = (GFC_INTEGER_4)0; + } for (y = 0; y < ycount; y++) { diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c index 5e0e6a792f9..18d877e20f9 100644 --- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.c @@ -178,7 +178,14 @@ matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b) GFC_INTEGER_8 *abase_n; GFC_INTEGER_8 bbase_yn; - memset (dest, 0, (sizeof (GFC_INTEGER_8) * size0((array_t *) retarray))); + if (rystride == ycount) + memset (dest, 0, (sizeof (GFC_INTEGER_8) * size0((array_t *) retarray))); + else + { + for (y = 0; y < ycount; y++) + for (x = 0; x < xcount; x++) + dest[x + y*rystride] = (GFC_INTEGER_8)0; + } for (y = 0; y < ycount; y++) { diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c index b6014d0dbce..642dc943837 100644 --- a/libgfortran/generated/matmul_r4.c +++ b/libgfortran/generated/matmul_r4.c @@ -178,7 +178,14 @@ matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b) GFC_REAL_4 *abase_n; GFC_REAL_4 bbase_yn; - memset (dest, 0, (sizeof (GFC_REAL_4) * size0((array_t *) retarray))); + if (rystride == ycount) + memset (dest, 0, (sizeof (GFC_REAL_4) * size0((array_t *) retarray))); + else + { + for (y = 0; y < ycount; y++) + for (x = 0; x < xcount; x++) + dest[x + y*rystride] = (GFC_REAL_4)0; + } for (y = 0; y < ycount; y++) { diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c index 5bf21f60404..1eb53cd6c67 100644 --- a/libgfortran/generated/matmul_r8.c +++ b/libgfortran/generated/matmul_r8.c @@ -178,7 +178,14 @@ matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b) GFC_REAL_8 *abase_n; GFC_REAL_8 bbase_yn; - memset (dest, 0, (sizeof (GFC_REAL_8) * size0((array_t *) retarray))); + if (rystride == ycount) + memset (dest, 0, (sizeof (GFC_REAL_8) * size0((array_t *) retarray))); + else + { + for (y = 0; y < ycount; y++) + for (x = 0; x < xcount; x++) + dest[x + y*rystride] = (GFC_REAL_8)0; + } for (y = 0; y < ycount; y++) { |