]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/iall_i1.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / iall_i1.c
index f02f7afa4b080e3831ec5f0559292855c8ee160c..3fe0a1698ada29201a60ab8ebb3a754abd6bfe24 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the IALL intrinsic
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2020 Free Software Foundation, Inc.
    Contributed by Tobias Burnus <burnus@net-b.de>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -100,7 +100,7 @@ iall_i1 (gfc_array_i1 * const restrict retarray,
        }
 
       retarray->offset = 0;
-      GFC_DTYPE_COPY_SETRANK(retarray,array,rank);
+      retarray->dtype.rank = rank;
 
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
@@ -220,6 +220,16 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
   index_type mdelta;
   int mask_kind;
 
+  if (mask == NULL)
+    {
+#ifdef HAVE_BACK_ARG
+      iall_i1 (retarray, array, pdim, back);
+#else
+      iall_i1 (retarray, array, pdim);
+#endif
+      return;
+    }
+
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
 
@@ -289,7 +299,7 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
       retarray->offset = 0;
-      GFC_DTYPE_COPY_SETRANK(retarray,array,rank);
+      retarray->dtype.rank = rank;
 
       if (alloc_size == 0)
        {
@@ -399,7 +409,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray,
   index_type dim;
 
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
 #ifdef HAVE_BACK_ARG
       iall_i1 (retarray, array, pdim, back);
@@ -452,7 +462,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray,
        }
 
       retarray->offset = 0;
-      GFC_DTYPE_COPY_SETRANK(retarray,array,rank);
+      retarray->dtype.rank = rank;
 
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];