]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/minloc1_8_r8.c
re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum...
[thirdparty/gcc.git] / libgfortran / generated / minloc1_8_r8.c
index 97c77967cd1e4416560dc97d532c8360a2208698..58b3cda79f3e746150be5876836f2f84489d04c9 100644 (file)
@@ -258,6 +258,16 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
   index_type mdelta;
   int mask_kind;
 
+  if (mask == NULL)
+    {
+#ifdef HAVE_BACK_ARG
+      minloc1_8_r8 (retarray, array, pdim, back);
+#else
+      minloc1_8_r8 (retarray, array, pdim);
+#endif
+      return;
+    }
+
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
 
@@ -480,7 +490,7 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
   index_type dim;
 
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
 #ifdef HAVE_BACK_ARG
       minloc1_8_r8 (retarray, array, pdim, back);