diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2006-05-05 13:08:23 +0200 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2006-05-05 11:08:23 +0000 |
commit | 1633cb7cb6b292ca0cfaa0311b2784927efe7990 (patch) | |
tree | 0f2a433855ba9689b3899ab64e40e7f90de20310 /libgfortran/generated | |
parent | 4b5d3f3f419ba55d63b378e6730f6cb932aee549 (diff) | |
download | gcc-1633cb7cb6b292ca0cfaa0311b2784927efe7990.zip gcc-1633cb7cb6b292ca0cfaa0311b2784927efe7990.tar.gz gcc-1633cb7cb6b292ca0cfaa0311b2784927efe7990.tar.bz2 |
re PR libfortran/26985 (incorrect matmul result)
PR libfortran/26985
* m4/matmul.m4: Correct the condition for the memset call,
and remove the unneeded call to size0.
* generated/matmul_r4.c: Regenerate.
* generated/matmul_r8.c: Regenerate.
* generated/matmul_r10.c: Regenerate.
* generated/matmul_r16.c: Regenerate.
* generated/matmul_c4.c: Regenerate.
* generated/matmul_c8.c: Regenerate.
* generated/matmul_c10.c: Regenerate.
* generated/matmul_c16.c: Regenerate.
* generated/matmul_i4.c: Regenerate.
* generated/matmul_i8.c: Regenerate.
* generated/matmul_i16.c: Regenerate.
* gfortran.dg/matmul_2.f90: New test.
From-SVN: r113552
Diffstat (limited to 'libgfortran/generated')
-rw-r--r-- | libgfortran/generated/matmul_c10.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c16.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c4.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c8.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i16.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i4.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i8.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r10.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r16.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r4.c | 4 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r8.c | 4 |
11 files changed, 22 insertions, 22 deletions
diff --git a/libgfortran/generated/matmul_c10.c b/libgfortran/generated/matmul_c10.c index edbd1e6..93032f8 100644 --- a/libgfortran/generated/matmul_c10.c +++ b/libgfortran/generated/matmul_c10.c @@ -193,8 +193,8 @@ matmul_c10 (gfc_array_c10 * const restrict retarray, const GFC_COMPLEX_10 * restrict abase_n; GFC_COMPLEX_10 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_COMPLEX_10) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_COMPLEX_10) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_c16.c b/libgfortran/generated/matmul_c16.c index c04146b..03ad0f7 100644 --- a/libgfortran/generated/matmul_c16.c +++ b/libgfortran/generated/matmul_c16.c @@ -193,8 +193,8 @@ matmul_c16 (gfc_array_c16 * const restrict retarray, const GFC_COMPLEX_16 * restrict abase_n; GFC_COMPLEX_16 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_COMPLEX_16) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_COMPLEX_16) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c index a01de37..84c94cd 100644 --- a/libgfortran/generated/matmul_c4.c +++ b/libgfortran/generated/matmul_c4.c @@ -193,8 +193,8 @@ matmul_c4 (gfc_array_c4 * const restrict retarray, const GFC_COMPLEX_4 * restrict abase_n; GFC_COMPLEX_4 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_COMPLEX_4) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_COMPLEX_4) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c index 75ec4fc..f491ea0 100644 --- a/libgfortran/generated/matmul_c8.c +++ b/libgfortran/generated/matmul_c8.c @@ -193,8 +193,8 @@ matmul_c8 (gfc_array_c8 * const restrict retarray, const GFC_COMPLEX_8 * restrict abase_n; GFC_COMPLEX_8 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_COMPLEX_8) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_COMPLEX_8) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_i16.c b/libgfortran/generated/matmul_i16.c index eacc47f..50d87bb 100644 --- a/libgfortran/generated/matmul_i16.c +++ b/libgfortran/generated/matmul_i16.c @@ -193,8 +193,8 @@ matmul_i16 (gfc_array_i16 * const restrict retarray, const GFC_INTEGER_16 * restrict abase_n; GFC_INTEGER_16 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_INTEGER_16) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_INTEGER_16) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c index 6166bf1..12ac630 100644 --- a/libgfortran/generated/matmul_i4.c +++ b/libgfortran/generated/matmul_i4.c @@ -193,8 +193,8 @@ matmul_i4 (gfc_array_i4 * const restrict retarray, const GFC_INTEGER_4 * restrict abase_n; GFC_INTEGER_4 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_INTEGER_4) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_INTEGER_4) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c index b83ded0..82b2229 100644 --- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.c @@ -193,8 +193,8 @@ matmul_i8 (gfc_array_i8 * const restrict retarray, const GFC_INTEGER_8 * restrict abase_n; GFC_INTEGER_8 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_INTEGER_8) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_INTEGER_8) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_r10.c b/libgfortran/generated/matmul_r10.c index 6702209..73e1e327 100644 --- a/libgfortran/generated/matmul_r10.c +++ b/libgfortran/generated/matmul_r10.c @@ -193,8 +193,8 @@ matmul_r10 (gfc_array_r10 * const restrict retarray, const GFC_REAL_10 * restrict abase_n; GFC_REAL_10 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_REAL_10) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_REAL_10) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_r16.c b/libgfortran/generated/matmul_r16.c index c095cbd..099c6bf 100644 --- a/libgfortran/generated/matmul_r16.c +++ b/libgfortran/generated/matmul_r16.c @@ -193,8 +193,8 @@ matmul_r16 (gfc_array_r16 * const restrict retarray, const GFC_REAL_16 * restrict abase_n; GFC_REAL_16 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_REAL_16) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_REAL_16) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c index dedc5a3..ca6a4a4 100644 --- a/libgfortran/generated/matmul_r4.c +++ b/libgfortran/generated/matmul_r4.c @@ -193,8 +193,8 @@ matmul_r4 (gfc_array_r4 * const restrict retarray, const GFC_REAL_4 * restrict abase_n; GFC_REAL_4 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_REAL_4) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_REAL_4) * xcount * ycount)); else { for (y = 0; y < ycount; y++) diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c index 926a860..1844cdc 100644 --- a/libgfortran/generated/matmul_r8.c +++ b/libgfortran/generated/matmul_r8.c @@ -193,8 +193,8 @@ matmul_r8 (gfc_array_r8 * const restrict retarray, const GFC_REAL_8 * restrict abase_n; GFC_REAL_8 bbase_yn; - if (rystride == ycount) - memset (dest, 0, (sizeof (GFC_REAL_8) * size0((array_t *) retarray))); + if (rystride == xcount) + memset (dest, 0, (sizeof (GFC_REAL_8) * xcount * ycount)); else { for (y = 0; y < ycount; y++) |