aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/m4
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2008-04-23 05:50:54 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2008-04-23 05:50:54 +0000
commit7edc89d4c168867a240e54533b2214bbc2a1987c (patch)
treebd46eec170f8c0e3cf03ec5971a682da2e37e83a /libgfortran/m4
parentd5555b955d4a769168475e623597cf822d8fd82a (diff)
downloadgcc-7edc89d4c168867a240e54533b2214bbc2a1987c.zip
gcc-7edc89d4c168867a240e54533b2214bbc2a1987c.tar.gz
gcc-7edc89d4c168867a240e54533b2214bbc2a1987c.tar.bz2
re PR fortran/35988 (run-time abort for MATMUL of run-time zero sized array)
2008-04-23 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35988 * m4/matmul.m4: Only issue a runtime error if extents are non-zero. * generated/matmul_i1.c: Regenerated. * generated/matmul_i2.c: Regenerated. * generated/matmul_i4.c: Regenerated. * generated/matmul_i8.c: Regenerated. * generated/matmul_i16.c: Regenerated. * generated/matmul_r4.c: Regenerated. * generated/matmul_r8.c: Regenerated. * generated/matmul_r10.c: Regenerated. * generated/matmul_r16.c: Regenerated. * generated/matmul_c4.c: Regenerated. * generated/matmul_c8.c: Regenerated. * generated/matmul_c10.c: Regenerated. * generated/matmul_c16.c: Regenerated. 2008-04-23 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35988 * gfortran.dg/matmul_7.f90: New test. From-SVN: r134579
Diffstat (limited to 'libgfortran/m4')
-rw-r--r--libgfortran/m4/matmul.m45
1 files changed, 4 insertions, 1 deletions
diff --git a/libgfortran/m4/matmul.m4 b/libgfortran/m4/matmul.m4
index a290bfe..181efa3 100644
--- a/libgfortran/m4/matmul.m4
+++ b/libgfortran/m4/matmul.m4
@@ -172,7 +172,10 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
}
if (count != b->dim[0].ubound + 1 - b->dim[0].lbound)
- runtime_error ("dimension of array B incorrect in MATMUL intrinsic");
+ {
+ if (count > 0 || b->dim[0].ubound + 1 - b->dim[0].lbound > 0)
+ runtime_error ("dimension of array B incorrect in MATMUL intrinsic");
+ }
if (GFC_DESCRIPTOR_RANK (b) == 1)
{