]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/spread_i1.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / spread_i1.c
index 11596b7585d6a7b165bd8049dfc1c0a96b952823..fc140e25f68bf799b7a6315ac3b3e3c85bcb7c0d 100644 (file)
@@ -1,5 +1,5 @@
 /* Special implementation of the SPREAD intrinsic
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Contributed by Thomas Koenig <tkoenig@gcc.gnu.org>, based on
    spread_generic.c written by Paul Brook <paul@nowt.org>
 
@@ -72,7 +72,8 @@ spread_i1 (gfc_array_i1 *ret, const gfc_array_i1 *source,
 
       /* The front end has signalled that we need to populate the
         return array descriptor.  */
-      ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rrank;
+      ret->dtype.rank = rrank;
+
       dim = 0;
       rs = 1;
       for (n = 0; n < rrank; n++)
@@ -227,10 +228,8 @@ spread_i1 (gfc_array_i1 *ret, const gfc_array_i1 *source,
 
 void
 spread_scalar_i1 (gfc_array_i1 *ret, const GFC_INTEGER_1 *source,
-                       const index_type along, const index_type pncopies)
+                       const index_type along, const index_type ncopies)
 {
-  int n;
-  int ncopies = pncopies;
   GFC_INTEGER_1 * restrict dest;
   index_type stride;
 
@@ -256,7 +255,7 @@ spread_scalar_i1 (gfc_array_i1 *ret, const GFC_INTEGER_1 *source,
   dest = ret->base_addr;
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
-  for (n = 0; n < ncopies; n++)
+  for (index_type n = 0; n < ncopies; n++)
     {
       *dest = *source;
       dest += stride;