PR libfortran/99218 - matmul on temporary array accesses invalid memory
authorHarald Anlauf <anlauf@gmx.de>
Fri, 5 Mar 2021 19:57:54 +0000 (20:57 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 5 Mar 2021 19:58:51 +0000 (20:58 +0100)
commitb1bee29167df6b0fbc9a4c8d06e2acbf3367af47
tree8aae97a3dafec5216e08b79398a9edbc57c3363e
parent1e5cdb9f896fb220b26fd2080406504c4badf5af
PR libfortran/99218 - matmul on temporary array accesses invalid memory

Do not invoke tuned rank-2 times rank-2 matmul if rank(b) == 1.

libgfortran/ChangeLog:

PR libfortran/99218
* m4/matmul_internal.m4: Invoke tuned matmul only for rank(b)>1.
* generated/matmul_c10.c: Regenerated.
* generated/matmul_c16.c: Likewise.
* generated/matmul_c4.c: Likewise.
* generated/matmul_c8.c: Likewise.
* generated/matmul_i1.c: Likewise.
* generated/matmul_i16.c: Likewise.
* generated/matmul_i2.c: Likewise.
* generated/matmul_i4.c: Likewise.
* generated/matmul_i8.c: Likewise.
* generated/matmul_r10.c: Likewise.
* generated/matmul_r16.c: Likewise.
* generated/matmul_r4.c: Likewise.
* generated/matmul_r8.c: Likewise.
* generated/matmulavx128_c10.c: Likewise.
* generated/matmulavx128_c16.c: Likewise.
* generated/matmulavx128_c4.c: Likewise.
* generated/matmulavx128_c8.c: Likewise.
* generated/matmulavx128_i1.c: Likewise.
* generated/matmulavx128_i16.c: Likewise.
* generated/matmulavx128_i2.c: Likewise.
* generated/matmulavx128_i4.c: Likewise.
* generated/matmulavx128_i8.c: Likewise.
* generated/matmulavx128_r10.c: Likewise.
* generated/matmulavx128_r16.c: Likewise.
* generated/matmulavx128_r4.c: Likewise.
* generated/matmulavx128_r8.c: Likewise.

gcc/testsuite/ChangeLog:

PR libfortran/99218
* gfortran.dg/matmul_21.f90: New test.
28 files changed:
gcc/testsuite/gfortran.dg/matmul_21.f90 [new file with mode: 0644]
libgfortran/generated/matmul_c10.c
libgfortran/generated/matmul_c16.c
libgfortran/generated/matmul_c4.c
libgfortran/generated/matmul_c8.c
libgfortran/generated/matmul_i1.c
libgfortran/generated/matmul_i16.c
libgfortran/generated/matmul_i2.c
libgfortran/generated/matmul_i4.c
libgfortran/generated/matmul_i8.c
libgfortran/generated/matmul_r10.c
libgfortran/generated/matmul_r16.c
libgfortran/generated/matmul_r4.c
libgfortran/generated/matmul_r8.c
libgfortran/generated/matmulavx128_c10.c
libgfortran/generated/matmulavx128_c16.c
libgfortran/generated/matmulavx128_c4.c
libgfortran/generated/matmulavx128_c8.c
libgfortran/generated/matmulavx128_i1.c
libgfortran/generated/matmulavx128_i16.c
libgfortran/generated/matmulavx128_i2.c
libgfortran/generated/matmulavx128_i4.c
libgfortran/generated/matmulavx128_i8.c
libgfortran/generated/matmulavx128_r10.c
libgfortran/generated/matmulavx128_r16.c
libgfortran/generated/matmulavx128_r4.c
libgfortran/generated/matmulavx128_r8.c
libgfortran/m4/matmul_internal.m4