re PR libfortran/85253 (asan detects heap-buffer-overflow in matmul_r4.c)
[gcc.git] / libgfortran / generated / in_unpack_r16.c
index 4cc3c7fe913ace0252c09e93647354dff0dfd0d9..03ecae7e10650d261ece440d23a0b735f3e58141 100644 (file)
@@ -1,5 +1,5 @@
 /* Helper function for repacking arrays.
-   Copyright (C) 2003-2017 Free Software Foundation, Inc.
+   Copyright (C) 2003-2018 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -39,7 +39,6 @@ internal_unpack_r16 (gfc_array_r16 * d, const GFC_REAL_16 * src)
   index_type dim;
   index_type dsize;
   GFC_REAL_16 * restrict dest;
-  int n;
 
   dest = d->base_addr;
   if (src == dest || !src)
@@ -47,7 +46,7 @@ internal_unpack_r16 (gfc_array_r16 * d, const GFC_REAL_16 * src)
 
   dim = GFC_DESCRIPTOR_RANK (d);
   dsize = 1;
-  for (n = 0; n < dim; n++)
+  for (index_type n = 0; n < dim; n++)
     {
       count[n] = 0;
       stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -77,7 +76,7 @@ internal_unpack_r16 (gfc_array_r16 * d, const GFC_REAL_16 * src)
       dest += stride0;
       count[0]++;
       /* Advance to the next source element.  */
-      n = 0;
+      index_type n = 0;
       while (count[n] == extent[n])
         {
           /* When we get to the end of a dimension, reset it and increment