diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-08 14:33:03 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-08 14:33:03 +0000 |
commit | 22d678e818e4cd9b7fe186fa0725a900df3f4db3 (patch) | |
tree | a38df818a0e3b820f84fcfd17398ee161742aa6c /gcc/fortran/trans-const.c | |
parent | b98fea5c1220e51f32afa42572c87eefb7f52760 (diff) | |
download | gcc-22d678e818e4cd9b7fe186fa0725a900df3f4db3.tar.gz |
* array.c: Don't include assert.h.
* data.c: Don't include assert.h. Replace assert and abort with
gcc_assert and gcc_unreachable.
* dependency.c: Ditto.
* f95-lang.c: Ditto.
* iresolve.c: Ditto.
* resolve.c: Ditto.
* simplify.c: Ditto.
* symbol.c: Ditto.
* trans-array.c: Ditto.
* trans-common.c: Ditto.
* trans-const.c: Ditto.
* trans-decl.c: Ditto.
* trans-expr.c: Ditto.
* trans-intrinsic.c: Ditto.
* trans-io.c: Ditto.
* trans-stmt.c: Ditto.
* trans-types.c: Ditto.
* trans.c: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87187 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-const.c')
-rw-r--r-- | gcc/fortran/trans-const.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c index 670e2f5df9c..e3c58507ca0 100644 --- a/gcc/fortran/trans-const.c +++ b/gcc/fortran/trans-const.c @@ -30,7 +30,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "toplev.h" #include "real.h" #include <gmp.h> -#include <assert.h> #include <math.h> #include "gfortran.h" #include "trans.h" @@ -70,7 +69,7 @@ gfc_build_const (tree type, tree intval) break; default: - abort (); + gcc_unreachable (); } return val; } @@ -102,10 +101,10 @@ gfc_conv_string_init (tree length, gfc_expr * expr) int slen; tree str; - assert (expr->expr_type == EXPR_CONSTANT); - assert (expr->ts.type == BT_CHARACTER && expr->ts.kind == 1); - assert (INTEGER_CST_P (length)); - assert (TREE_INT_CST_HIGH (length) == 0); + gcc_assert (expr->expr_type == EXPR_CONSTANT); + gcc_assert (expr->ts.type == BT_CHARACTER && expr->ts.kind == 1); + gcc_assert (INTEGER_CST_P (length)); + gcc_assert (TREE_INT_CST_HIGH (length) == 0); len = TREE_INT_CST_LOW (length); slen = expr->value.character.length; @@ -191,7 +190,7 @@ gfc_conv_mpz_to_tree (mpz_t i, int kind) /* We assume that all numbers are in range for its type, and that we never create a type larger than 2*HWI, which is the largest that the middle-end can handle. */ - assert (count == 1 || count == 2); + gcc_assert (count == 1 || count == 2); low = words[0]; high = words[1]; @@ -228,7 +227,7 @@ gfc_conv_mpfr_to_tree (mpfr_t f, int kind) if (gfc_real_kinds[n].kind == kind) break; } - assert (gfc_real_kinds[n].kind); + gcc_assert (gfc_real_kinds[n].kind); n = MAX (abs (gfc_real_kinds[n].min_exponent), abs (gfc_real_kinds[n].max_exponent)); @@ -292,7 +291,7 @@ gfc_conv_mpfr_to_tree (mpfr_t f, int kind) tree gfc_conv_constant_to_tree (gfc_expr * expr) { - assert (expr->expr_type == EXPR_CONSTANT); + gcc_assert (expr->expr_type == EXPR_CONSTANT); switch (expr->ts.type) { @@ -332,13 +331,13 @@ gfc_conv_constant_to_tree (gfc_expr * expr) void gfc_conv_constant (gfc_se * se, gfc_expr * expr) { - assert (expr->expr_type == EXPR_CONSTANT); + gcc_assert (expr->expr_type == EXPR_CONSTANT); if (se->ss != NULL) { - assert (se->ss != gfc_ss_terminator); - assert (se->ss->type == GFC_SS_SCALAR); - assert (se->ss->expr == expr); + gcc_assert (se->ss != gfc_ss_terminator); + gcc_assert (se->ss->type == GFC_SS_SCALAR); + gcc_assert (se->ss->expr == expr); se->expr = se->ss->data.scalar.expr; se->string_length = se->ss->string_length; |