aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-08-25 23:07:52 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-08-25 23:07:52 -0700
commite7a2d5fb772b33ef161b201d579b6d58c5fb1ed1 (patch)
tree888872234485cb430569f6f616fdcf7a056f67a7 /gcc/fortran/decl.c
parent1249691bab4f13ceb72ec2a535a0fc9a37818161 (diff)
downloadgcc-e7a2d5fb772b33ef161b201d579b6d58c5fb1ed1.zip
gcc-e7a2d5fb772b33ef161b201d579b6d58c5fb1ed1.tar.gz
gcc-e7a2d5fb772b33ef161b201d579b6d58c5fb1ed1.tar.bz2
arith.c (gfc_validate_kind): Add may_fail argument; abort if false and we don't validate the kind.
* arith.c (gfc_validate_kind): Add may_fail argument; abort if false and we don't validate the kind. (gfc_check_integer_range, gfc_check_real_range): Update to match. * check.c (kind_check): Likewise. * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise. (match_char_spec, match_logical_spec): Likewise. * gfortran.h (gfc_validate_kind): Likewise. * options.c (gfc_handle_option): Likewise. * primary.c (match_integer_constant, match_real_constant, match_string_constant, match_logical_constant, match_const_complex_part): Likewise. * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits, gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr, gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc, gfc_simplify_maxexponent, gfc_simplify_minexponent, gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision, gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing, gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan, gfc_simplify_tiny): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, prepare_arg_info): Likewise. From-SVN: r86608
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index e00a614..3a61fda 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -632,7 +632,7 @@ gfc_match_old_kind_spec (gfc_typespec * ts)
if (ts->type == BT_COMPLEX && ts->kind == 16)
ts->kind = 8;
- if (gfc_validate_kind (ts->type, ts->kind) == -1)
+ if (gfc_validate_kind (ts->type, ts->kind, true) < 0)
{
gfc_error ("Old-style kind %d not supported for type %s at %C",
ts->kind, gfc_basic_typename (ts->type));
@@ -692,7 +692,7 @@ gfc_match_kind_spec (gfc_typespec * ts)
gfc_free_expr (e);
e = NULL;
- if (gfc_validate_kind (ts->type, ts->kind) == -1)
+ if (gfc_validate_kind (ts->type, ts->kind, true) < 0)
{
gfc_error ("Kind %d not supported for type %s at %C", ts->kind,
gfc_basic_typename (ts->type));
@@ -790,7 +790,7 @@ match_char_spec (gfc_typespec * ts)
gfc_match_small_int (&kind);
- if (gfc_validate_kind (BT_CHARACTER, kind) == -1)
+ if (gfc_validate_kind (BT_CHARACTER, kind, true) < 0)
{
gfc_error ("Kind %d is not a CHARACTER kind at %C", kind);
return MATCH_YES;
@@ -833,7 +833,7 @@ syntax:
m = MATCH_ERROR;
done:
- if (m == MATCH_YES && gfc_validate_kind (BT_CHARACTER, kind) == -1)
+ if (m == MATCH_YES && gfc_validate_kind (BT_CHARACTER, kind, true) < 0)
{
gfc_error ("Kind %d is not a CHARACTER kind at %C", kind);
m = MATCH_ERROR;