]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/matmul_r4.c
re PR fortran/35988 (run-time abort for MATMUL of run-time zero sized array)
[thirdparty/gcc.git] / libgfortran / generated / matmul_r4.c
index dc89f5592f9d3fbadfdaa0b7979bddf7306ef93d..1154d41a33f2148c599cbf240b8c23dbd0521b13 100644 (file)
@@ -170,7 +170,10 @@ matmul_r4 (gfc_array_r4 * const restrict retarray,
     }
 
   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)
     {