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