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