aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-11-24 00:25:01 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-11-24 00:25:01 +0000
commitbe9c3c6e931d77e06d5ec6366d7379f27dd35dd3 (patch)
treeddbdb823d91156c4576ecc437fb5a3fac2a14cde /gcc/fortran/check.c
parenta98a436fdf4451837a3c564048ddfaef5a53b1e6 (diff)
downloadgcc-be9c3c6e931d77e06d5ec6366d7379f27dd35dd3.zip
gcc-be9c3c6e931d77e06d5ec6366d7379f27dd35dd3.tar.gz
gcc-be9c3c6e931d77e06d5ec6366d7379f27dd35dd3.tar.bz2
re PR libfortran/34209 (run-time lib: NEAREST(0.0_8, -1.0) produces wrong numbers)
2007-11-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/34209 * iresolve.c (gfc_resolve_nearest): If sign variable kind does not match kind of input variable, convert it to match. PR fortran/33317 * trans.h: Modify prototype for gfc_conv_missing_dummy. * trans-expr.c (gfc_conv_missing_dummy): Modify to pass an integer kind parameter in. Set the type of the dummy to the kind given. (gfc_conv_function_call): Pass representation.length to gfc_conv_missing_dummy. * iresolve.c (gfc_resolve_cshift): Determine the correct kind to use and if appropriate set representation.length to this kind value. (gfc_resolve_eoshift): Likewise. * check.c (gfc_check_cshift): Enable dim_check to allow DIM as an optional argument. (gfc_check_eoshift): Likewise. * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Update call to gfc_conv_missing_dummy. From-SVN: r130391
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 5b12147..511dce6 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -863,8 +863,7 @@ gfc_check_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim)
/* TODO: more requirements on shift parameter. */
}
- /* FIXME (PR33317): Allow optional DIM=. */
- if (dim_check (dim, 2, false) == FAILURE)
+ if (dim_check (dim, 2, true) == FAILURE)
return FAILURE;
return SUCCESS;
@@ -1033,8 +1032,7 @@ gfc_check_eoshift (gfc_expr *array, gfc_expr *shift, gfc_expr *boundary,
/* TODO: more restrictions on boundary. */
}
- /* FIXME (PR33317): Allow optional DIM=. */
- if (dim_check (dim, 4, false) == FAILURE)
+ if (dim_check (dim, 4, true) == FAILURE)
return FAILURE;
return SUCCESS;