[patch, libfortran] Bounds checking for spread

Dominique Dhumieres dominiq@lps.ens.fr
Wed Oct 15 20:55:00 GMT 2008


Thomas,

I just noticed the following change:

--- ../gcc-4.4-work/libgfortran/generated/spread_r4.c   2008-09-07 18:19:09.000000000 +0200
+++ libgfortran/generated/spread_r4.c   2008-10-15 22:44:06.000000000 +0200
@@ -131,7 +131,8 @@
              if (n == along - 1)
                {
                  rdelta = ret->dim[n].stride;
-
+                 printf("ret_extent = %ld, ncopies = %ld\n",
+                        (long int) ret_extent, (long int) ncopies);
                  if (ret_extent != ncopies)
                    runtime_error("Incorrect extent in return value of SPREAD"
                                  " intrinsic in dimension %ld: is %ld,"

Is the 'printf' really intended or just a left-over from debugging?

TIA

Dominique



More information about the Fortran mailing list