]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/minloc0_16_r4.c
re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum...
[thirdparty/gcc.git] / libgfortran / generated / minloc0_16_r4.c
index ddeac3d33791b978ca7d4f667d77c4da6f60645f..90034daa426c1502c866e317f1dc42c5a5e9ac93 100644 (file)
@@ -198,6 +198,13 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
   index_type n;
   int mask_kind;
 
+
+  if (mask == NULL)
+    {
+      minloc0_16_r4 (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_16_r4 (gfc_array_i16 * const restrict retarray,
   index_type n;
   GFC_INTEGER_16 *dest;
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
       minloc0_16_r4 (retarray, array, back);
       return;