diff options
Diffstat (limited to 'gcc/fortran/data.c')
-rw-r--r-- | gcc/fortran/data.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c index 6aaa3157e32..f297ef56faf 100644 --- a/gcc/fortran/data.c +++ b/gcc/fortran/data.c @@ -129,8 +129,8 @@ create_character_initializer (gfc_expr *init, gfc_typespec *ts, start_expr = gfc_copy_expr (ref->u.ss.start); end_expr = gfc_copy_expr (ref->u.ss.end); - if ((gfc_simplify_expr (start_expr, 1) == FAILURE) - || (gfc_simplify_expr (end_expr, 1)) == FAILURE) + if ((!gfc_simplify_expr(start_expr, 1)) + || !(gfc_simplify_expr(end_expr, 1))) { gfc_error ("failure to simplify substring reference in DATA " "statement at %L", &ref->u.ss.start->where); @@ -196,7 +196,7 @@ create_character_initializer (gfc_expr *init, gfc_typespec *ts, consecutive values in LVALUE the same value in RVALUE. In that case, LVALUE must refer to a full array, not an array section. */ -gfc_try +bool gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, mpz_t *repeat) { @@ -283,7 +283,7 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, && ref->next == NULL); mpz_init_set (end, offset); mpz_add (end, end, *repeat); - if (spec_size (ref->u.ar.as, &size) == SUCCESS) + if (spec_size (ref->u.ar.as, &size)) { if (mpz_cmp (end, size) > 0) { @@ -319,8 +319,8 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, ? con->expr : rvalue; if (gfc_notify_std (GFC_STD_GNU, "re-initialization of '%s' at %L", - symbol->name, &exprd->where) == FAILURE) - return FAILURE; + symbol->name, &exprd->where) == false) + return false; } while (con != NULL) @@ -372,7 +372,7 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, else { mpz_t size; - if (spec_size (ref->u.ar.as, &size) == SUCCESS) + if (spec_size (ref->u.ar.as, &size)) { if (mpz_cmp (offset, size) >= 0) { @@ -468,7 +468,7 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, if (ref || last_ts->type == BT_CHARACTER) { if (lvalue->ts.u.cl->length == NULL && !(ref && ref->u.ss.length != NULL)) - return FAILURE; + return false; expr = create_character_initializer (init, last_ts, ref, rvalue); } else @@ -485,8 +485,8 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, ? init : rvalue; if (gfc_notify_std (GFC_STD_GNU, "re-initialization of '%s' at %L", - symbol->name, &expr->where) == FAILURE) - return FAILURE; + symbol->name, &expr->where) == false) + return false; } expr = gfc_copy_expr (rvalue); @@ -499,13 +499,13 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, else last_con->expr = expr; - return SUCCESS; + return true; abort: if (!init) gfc_free_expr (expr); mpz_clear (offset); - return FAILURE; + return false; } |