]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/matmul_c16.c
re PR fortran/35988 (run-time abort for MATMUL of run-time zero sized array)
[thirdparty/gcc.git] / libgfortran / generated / matmul_c16.c
index 79ca57858ab74a2d44d49d5ce57382cf964b5abe..6a2a63909678c1ea66f9175029ded72f24f84b78 100644 (file)
@@ -170,7 +170,10 @@ matmul_c16 (gfc_array_c16 * 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)
     {