]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/maxloc0_4_i4.c
re PR fortran/30512 ([4.1 only] MAXVAL() incorrect for zero-size int arrays, and...
[thirdparty/gcc.git] / libgfortran / generated / maxloc0_4_i4.c
index 16ee31ede316b6a28fa24a581498b51de0a131ac..a1ba2ae29ca7c5039d06e5f45caa5d2d40d08edb 100644 (file)
@@ -103,7 +103,7 @@ maxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
 
   GFC_INTEGER_4 maxval;
 
-  maxval = -GFC_INTEGER_4_HUGE;
+  maxval = (-GFC_INTEGER_4_HUGE-1);
 
   while (base)
     {
@@ -227,7 +227,7 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
 
   GFC_INTEGER_4 maxval;
 
-  maxval = -GFC_INTEGER_4_HUGE;
+  maxval = (-GFC_INTEGER_4_HUGE-1);
 
   while (base)
     {