summaryrefslogtreecommitdiff
path: root/libgfortran/generated/matmul_c4.c
diff options
context:
space:
mode:
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-10 17:21:44 +0000
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-10 17:21:44 +0000
commit609b676a0cc1eb91cb81290d9f0ec1d3f8b4a1f1 (patch)
tree8042aa969d343b56b5ee82785eb2c28922abe06c /libgfortran/generated/matmul_c4.c
parent661b18fe408590a565864cf50c10a0bf308a662c (diff)
downloadgcc-609b676a0cc1eb91cb81290d9f0ec1d3f8b4a1f1.tar.gz
2006-09-10 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/28947 * m4/matmul.m4: For the case where the second input argument is transposed, ensure that the case with rank (a) == 1 is correctly calculated. * 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. 2006-09-10 Paul Thomas <pault@gcc.gnu.org> PR libfortran/28947 gfortran.dg/matmul_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116817 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated/matmul_c4.c')
-rw-r--r--libgfortran/generated/matmul_c4.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c
index d85bd277fde..2d47a134972 100644
--- a/libgfortran/generated/matmul_c4.c
+++ b/libgfortran/generated/matmul_c4.c
@@ -258,6 +258,20 @@ matmul_c4 (gfc_array_c4 * const restrict retarray,
/* dest[x,y] += a[x,n] * b[n,y] */
dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride];
}
+ else if (GFC_DESCRIPTOR_RANK (a) == 1)
+ {
+ const GFC_COMPLEX_4 *restrict bbase_y;
+ GFC_COMPLEX_4 s;
+
+ for (y = 0; y < ycount; y++)
+ {
+ bbase_y = &bbase[y*bystride];
+ s = (GFC_COMPLEX_4) 0;
+ for (n = 0; n < count; n++)
+ s += abase[n*axstride] * bbase_y[n*bxstride];
+ dest[y*rxstride] = s;
+ }
+ }
else
{
const GFC_COMPLEX_4 *restrict abase_x;