diff options
Diffstat (limited to 'gcc/fortran/trans-intrinsic.c')
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 9bc465e..532d3ab 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -2235,8 +2235,9 @@ trans_this_image (gfc_se * se, gfc_expr *expr) if (INTEGER_CST_P (dim_arg)) { - if (wi::ltu_p (dim_arg, 1) - || wi::gtu_p (dim_arg, GFC_TYPE_ARRAY_CORANK (TREE_TYPE (desc)))) + if (wi::ltu_p (wi::to_wide (dim_arg), 1) + || wi::gtu_p (wi::to_wide (dim_arg), + GFC_TYPE_ARRAY_CORANK (TREE_TYPE (desc)))) gfc_error ("%<dim%> argument of %s intrinsic at %L is not a valid " "dimension index", expr->value.function.isym->name, &expr->where); @@ -2657,8 +2658,9 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper) if (INTEGER_CST_P (bound)) { if (((!as || as->type != AS_ASSUMED_RANK) - && wi::geu_p (bound, GFC_TYPE_ARRAY_RANK (TREE_TYPE (desc)))) - || wi::gtu_p (bound, GFC_MAX_DIMENSIONS)) + && wi::geu_p (wi::to_wide (bound), + GFC_TYPE_ARRAY_RANK (TREE_TYPE (desc)))) + || wi::gtu_p (wi::to_wide (bound), GFC_MAX_DIMENSIONS)) gfc_error ("%<dim%> argument of %s intrinsic at %L is not a valid " "dimension index", upper ? "UBOUND" : "LBOUND", &expr->where); @@ -2853,8 +2855,9 @@ conv_intrinsic_cobound (gfc_se * se, gfc_expr * expr) if (INTEGER_CST_P (bound)) { - if (wi::ltu_p (bound, 1) - || wi::gtu_p (bound, GFC_TYPE_ARRAY_CORANK (TREE_TYPE (desc)))) + if (wi::ltu_p (wi::to_wide (bound), 1) + || wi::gtu_p (wi::to_wide (bound), + GFC_TYPE_ARRAY_CORANK (TREE_TYPE (desc)))) gfc_error ("%<dim%> argument of %s intrinsic at %L is not a valid " "dimension index", expr->value.function.isym->name, &expr->where); |