https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77908

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The diff between the original dump with -m32 and -m64 gives

--- pr77908.f90.003t.original   2016-10-09 11:54:56.000000000 +0200
+++ pr77908.f90_64.003t.original        2016-10-09 11:53:59.000000000 +0200
@@ -14,13 +14,12 @@ error_index_long ()
     _gfortran_st_write_done (&dt_parm.0);
   }
   {
-    integer(kind=4) S.1;
+    integer(kind=8) S.1;

-    S.1 = -11;
+    S.1 = 9223372036854775797;
     while (1)
       {
-        if (S.1 >= 0) goto L.1;
-        value[S.1 + 11] = 1;
+        value[S.1 + -9223372036854775797] = 1;
         S.1 = S.1 + 1;
       }
     L.1:;
@@ -40,11 +39,11 @@ error_index_long ()
       struct array1_integer(kind=4) parm.3;

       parm.3.dtype = 265;
-      parm.3.dim[0].lbound = -11;
-      parm.3.dim[0].ubound = -1;
+      parm.3.dim[0].lbound = 9223372036854775797;
+      parm.3.dim[0].ubound = 9223372036854775807;
       parm.3.dim[0].stride = 1;
       parm.3.data = (void *) &value[0];
-      parm.3.offset = 11;
+      parm.3.offset = -9223372036854775797;
       _gfortran_transfer_array_write (&dt_parm.2, &parm.3, 4, 0);
     }
     _gfortran_st_write_done (&dt_parm.2);

Note that the exit condition

        if (S.1 >= 0) goto L.1;

is missing when the test is compiled with -m64.

Reply via email to