]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/minloc0_8_r16.c
re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum...
[thirdparty/gcc.git] / libgfortran / generated / minloc0_8_r16.c
index d6c7318409ea17771814e25d35bd961c38f36148..489cb3509b3355e6c42571c389076c3785ec3aad 100644 (file)
@@ -198,6 +198,13 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray,
   index_type n;
   int mask_kind;
 
+
+  if (mask == NULL)
+    {
+      minloc0_8_r16 (retarray, array, back);
+      return;
+    }
+
   rank = GFC_DESCRIPTOR_RANK (array);
   if (rank <= 0)
     runtime_error ("Rank of array needs to be > 0");
@@ -368,7 +375,7 @@ sminloc0_8_r16 (gfc_array_i8 * const restrict retarray,
   index_type n;
   GFC_INTEGER_8 *dest;
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
       minloc0_8_r16 (retarray, array, back);
       return;