diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-01-13 22:13:52 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-01-13 22:13:52 +0000 |
commit | ccacefc7a6d38dd4d8b959ed5ed01591fba41f53 (patch) | |
tree | 2b158e0165f5aa4758358e2f62c9cf2ba4b8963c /libgfortran/m4 | |
parent | 5ad6345e92e2e6f191b943cf7cba49bb5d90ec27 (diff) | |
download | gcc-ccacefc7a6d38dd4d8b959ed5ed01591fba41f53.zip gcc-ccacefc7a6d38dd4d8b959ed5ed01591fba41f53.tar.gz gcc-ccacefc7a6d38dd4d8b959ed5ed01591fba41f53.tar.bz2 |
re PR libfortran/34746 (wrong formats in libgfortran's runtime_error)
2008-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34746
* m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Use %ld
in printf format for all bounds checking; cast all
integer-like arguments to runtime_error() to long int.
(`m'name`'rtype_qual`_'atype_code): Likewise.
(`s'name`'rtype_qual`_'atype_code): Likewise.
* m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Likewise.
(`m'name`'rtype_qual`_'atype_code): Likewise.
(`s'name`'rtype_qual`_'atype_code): Likewise.
* generated/all_l16.c: Regenerated.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l16.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/count_16_l16.c: Regenerated.
* generated/count_16_l4.c: Regenerated.
* generated/count_16_l8.c: Regenerated.
* generated/count_4_l16.c: Regenerated.
* generated/count_4_l4.c: Regenerated.
* generated/count_4_l8.c: Regenerated.
* generated/count_8_l16.c: Regenerated.
* generated/count_8_l4.c: Regenerated.
* generated/count_8_l8.c: Regenerated.
* generated/maxloc0_16_i1.c: Regenerated.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/maxloc0_16_i2.c: Regenerated.
* generated/maxloc0_16_i4.c: Regenerated.
* generated/maxloc0_16_i8.c: Regenerated.
* generated/maxloc0_16_r10.c: Regenerated.
* generated/maxloc0_16_r16.c: Regenerated.
* generated/maxloc0_16_r4.c: Regenerated.
* generated/maxloc0_16_r8.c: Regenerated.
* generated/maxloc0_4_i1.c: Regenerated.
* generated/maxloc0_4_i16.c: Regenerated.
* generated/maxloc0_4_i2.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r10.c: Regenerated.
* generated/maxloc0_4_r16.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_8_i1.c: Regenerated.
* generated/maxloc0_8_i16.c: Regenerated.
* generated/maxloc0_8_i2.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r10.c: Regenerated.
* generated/maxloc0_8_r16.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc1_16_i1.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/maxloc1_16_i2.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc1_4_i1.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_i2.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i1.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc1_8_i2.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i1.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/maxval_i2.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_16_i1.c: Regenerated.
* generated/minloc0_16_i16.c: Regenerated.
* generated/minloc0_16_i2.c: Regenerated.
* generated/minloc0_16_i4.c: Regenerated.
* generated/minloc0_16_i8.c: Regenerated.
* generated/minloc0_16_r10.c: Regenerated.
* generated/minloc0_16_r16.c: Regenerated.
* generated/minloc0_16_r4.c: Regenerated.
* generated/minloc0_16_r8.c: Regenerated.
* generated/minloc0_4_i1.c: Regenerated.
* generated/minloc0_4_i16.c: Regenerated.
* generated/minloc0_4_i2.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r10.c: Regenerated.
* generated/minloc0_4_r16.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_8_i1.c: Regenerated.
* generated/minloc0_8_i16.c: Regenerated.
* generated/minloc0_8_i2.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r10.c: Regenerated.
* generated/minloc0_8_r16.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc1_16_i1.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/minloc1_16_i2.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/minloc1_4_i1.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc1_4_i2.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i1.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/minloc1_8_i2.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i1.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/minval_i2.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i1.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/product_i2.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i1.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/sum_i2.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r10.c: Regenerated.
* generated/sum_r16.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
From-SVN: r131514
Diffstat (limited to 'libgfortran/m4')
-rw-r--r-- | libgfortran/m4/iforeach.m4 | 21 | ||||
-rw-r--r-- | libgfortran/m4/ifunction.m4 | 19 |
2 files changed, 21 insertions, 19 deletions
diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4 index a49d33b..071900b0 100644 --- a/libgfortran/m4/iforeach.m4 +++ b/libgfortran/m4/iforeach.m4 @@ -44,13 +44,13 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray, ret_rank = GFC_DESCRIPTOR_RANK (retarray); if (ret_rank != 1) runtime_error ("rank of return array in u_name intrinsic" - " should be 1, is %d", ret_rank); + " should be 1, is %ld", (long int) ret_rank); ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound; if (ret_extent != rank) runtime_error ("Incorrect extent in return value of" - " u_name intrnisic: is %ld, should be %d", - (long int) ret_extent, rank); + " u_name intrnisic: is %ld, should be %ld", + (long int) ret_extent, (long int) rank); } } @@ -162,18 +162,19 @@ void ret_rank = GFC_DESCRIPTOR_RANK (retarray); if (ret_rank != 1) runtime_error ("rank of return array in u_name intrinsic" - " should be 1, is %d", ret_rank); + " should be 1, is %ld", (long int) ret_rank); ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound; if (ret_extent != rank) runtime_error ("Incorrect extent in return value of" - " u_name intrnisic: is %ld, should be %d", - (long int) ret_extent, rank); + " u_name intrnisic: is %ld, should be %ld", + (long int) ret_extent, (long int) rank); mask_rank = GFC_DESCRIPTOR_RANK (mask); if (rank != mask_rank) runtime_error ("rank of MASK argument in u_name intrnisic" - "should be %d, is %d", rank, mask_rank); + "should be %ld, is %ld", (long int) rank, + (long int) mask_rank); for (n=0; n<rank; n++) { @@ -181,8 +182,8 @@ void mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound; if (array_extent != mask_extent) runtime_error ("Incorrect extent in MASK argument of" - " u_name intrinsic in dimension %d:" - " is %ld, should be %ld", n + 1, + " u_name intrinsic in dimension %ld:" + " is %ld, should be %ld", (long int) n + 1, (long int) mask_extent, (long int) array_extent); } } @@ -318,7 +319,7 @@ void ret_rank = GFC_DESCRIPTOR_RANK (retarray); if (ret_rank != 1) runtime_error ("rank of return array in u_name intrinsic" - " should be 1, is %d", ret_rank); + " should be 1, is %ld", (long int) ret_rank); ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound; if (ret_extent != rank) diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index 965fff8..9769e4d 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -99,8 +99,9 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray, { if (rank != GFC_DESCRIPTOR_RANK (retarray)) runtime_error ("rank of return array incorrect in" - " u_name intrinsic: is %d, should be %d", - GFC_DESCRIPTOR_RANK (retarray), rank); + " u_name intrinsic: is %ld, should be %ld", + (long int) (GFC_DESCRIPTOR_RANK (retarray)), + (long int) rank); if (compile_options.bounds_check) { @@ -112,8 +113,8 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - retarray->dim[n].lbound; if (extent[n] != ret_extent) runtime_error ("Incorrect extent in return value of" - " u_name intrinsic in dimension %d:" - " is %ld, should be %ld", n + 1, + " u_name intrinsic in dimension %ld:" + " is %ld, should be %ld", (long int) n + 1, (long int) ret_extent, (long int) extent[n]); } } @@ -299,8 +300,8 @@ void - retarray->dim[n].lbound; if (extent[n] != ret_extent) runtime_error ("Incorrect extent in return value of" - " u_name intrinsic in dimension %d:" - " is %ld, should be %ld", n + 1, + " u_name intrinsic in dimension %ld:" + " is %ld, should be %ld", (long int) n + 1, (long int) ret_extent, (long int) extent[n]); } for (n=0; n<= rank; n++) @@ -311,8 +312,8 @@ void mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound; if (array_extent != mask_extent) runtime_error ("Incorrect extent in MASK argument of" - " u_name intrinsic in dimension %d:" - " is %ld, should be %ld", n + 1, + " u_name intrinsic in dimension %ld:" + " is %ld, should be %ld", (long int) n + 1, (long int) mask_extent, (long int) array_extent); } } @@ -430,7 +431,7 @@ void ret_rank = GFC_DESCRIPTOR_RANK (retarray); if (ret_rank != 1) runtime_error ("rank of return array in u_name intrinsic" - " should be 1, is %d", ret_rank); + " should be 1, is %ld", (long int) ret_rank); ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound; if (ret_extent != rank) |