diff options
author | Richard Guenther <rguenther@suse.de> | 2006-11-11 12:05:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-11-11 12:05:16 +0000 |
commit | f9f770a8d56552aab041b8de6548858241a03f53 (patch) | |
tree | cb723aeab3548d72f74efba74a23f935f9ce156c /gcc/fortran | |
parent | e324a72fe6698293540634a6122578ab3d0f5f37 (diff) | |
download | gcc-f9f770a8d56552aab041b8de6548858241a03f53.zip gcc-f9f770a8d56552aab041b8de6548858241a03f53.tar.gz gcc-f9f770a8d56552aab041b8de6548858241a03f53.tar.bz2 |
tree.def (FIX_CEIL_EXPR, [...]): Remove unused tree codes.
2006-11-11 Richard Guenther <rguenther@suse.de>
* tree.def (FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR):
Remove unused tree codes.
* tree-vrp.c (extract_range_from_unary_expr): Remove handling
of FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
* tree.c (stabilize_reference): Likewise.
* fold-const.c (fold_convert_const_int_from_real, operand_equal_p,
fold_unary): Likewise.
* tree-gimple.c (is_gimple_cast): Likewise.
* dwarf2out.c (loc_descriptor_from_tree_1): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* tree-eh.c (tree_could_trap_p): Likewise.
* gimplify.c (gimplify_expr): Likewise.
* tree-inline.c (estimate_num_insns_1): Likewise.
* tree-cfg.c (verify_expr): Likewise.
cp/
* typeck.c (build_unary_op): Likewise.
java/
* check-init.c (check_init): Likewise.
ada/
* trans.c (maybe_stabilize_reference): Likewise.
fortran/
* trans-intrinsic.c (enum rounding_mode): New enum.
(build_fix_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
gfc_conv_intrinsic_function): Use it instead of FIX_CEIL_EXPR,
FIX_FLOOR_EXPR, FIX_ROUND_EXPR and FIX_TRUNC_EXPR.
From-SVN: r118692
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 36 |
2 files changed, 26 insertions, 17 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2b4eaad..66ee88e9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2006-11-11 Richard Guenther <rguenther@suse.de> + + * trans-intrinsic.c (enum rounding_mode): New enum. + (build_fix_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, + gfc_conv_intrinsic_function): Use it instead of FIX_CEIL_EXPR, + FIX_FLOOR_EXPR, FIX_ROUND_EXPR and FIX_TRUNC_EXPR. + 2006-11-10 Brooks Moses <brooks.moses@codesourcery.com> * lang.opt (-fmodule-private): Remove option. diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 5389c0b..ec857a53 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -160,6 +160,7 @@ typedef struct } real_compnt_info; +enum rounding_mode { RND_ROUND, RND_TRUNC, RND_CEIL, RND_FLOOR }; /* Evaluate the arguments to an intrinsic function. */ @@ -307,23 +308,24 @@ build_round_expr (stmtblock_t * pblock, tree arg, tree type) static tree build_fix_expr (stmtblock_t * pblock, tree arg, tree type, - enum tree_code op) + enum rounding_mode op) { switch (op) { - case FIX_FLOOR_EXPR: + case RND_FLOOR: return build_fixbound_expr (pblock, arg, type, 0); break; - case FIX_CEIL_EXPR: + case RND_CEIL: return build_fixbound_expr (pblock, arg, type, 1); break; - case FIX_ROUND_EXPR: + case RND_ROUND: return build_round_expr (pblock, arg, type); default: - return build1 (op, type, arg); + gcc_assert (op == RND_TRUNC); + return build1 (FIX_TRUNC_EXPR, type, arg); } } @@ -338,7 +340,7 @@ build_fix_expr (stmtblock_t * pblock, tree arg, tree type, */ static void -gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op) +gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum rounding_mode op) { tree type; tree itype; @@ -355,7 +357,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op) /* We have builtin functions for some cases. */ switch (op) { - case FIX_ROUND_EXPR: + case RND_ROUND: switch (kind) { case 4: @@ -373,7 +375,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op) } break; - case FIX_TRUNC_EXPR: + case RND_TRUNC: switch (kind) { case 4: @@ -437,7 +439,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op) /* Convert to an integer using the specified rounding mode. */ static void -gfc_conv_intrinsic_int (gfc_se * se, gfc_expr * expr, int op) +gfc_conv_intrinsic_int (gfc_se * se, gfc_expr * expr, enum rounding_mode op) { tree type; tree arg; @@ -1076,9 +1078,9 @@ gfc_conv_intrinsic_mod (gfc_se * se, gfc_expr * expr, int modulo) itype = gfc_get_int_type (ikind); if (modulo) - tmp = build_fix_expr (&se->pre, tmp, itype, FIX_FLOOR_EXPR); + tmp = build_fix_expr (&se->pre, tmp, itype, RND_FLOOR); else - tmp = build_fix_expr (&se->pre, tmp, itype, FIX_TRUNC_EXPR); + tmp = build_fix_expr (&se->pre, tmp, itype, RND_TRUNC); tmp = convert (type, tmp); tmp = build3 (COND_EXPR, type, test2, tmp, arg); tmp = build2 (MULT_EXPR, type, tmp, arg2); @@ -3474,7 +3476,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) break; case GFC_ISYM_AINT: - gfc_conv_intrinsic_aint (se, expr, FIX_TRUNC_EXPR); + gfc_conv_intrinsic_aint (se, expr, RND_TRUNC); break; case GFC_ISYM_ALL: @@ -3482,7 +3484,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) break; case GFC_ISYM_ANINT: - gfc_conv_intrinsic_aint (se, expr, FIX_ROUND_EXPR); + gfc_conv_intrinsic_aint (se, expr, RND_ROUND); break; case GFC_ISYM_AND: @@ -3515,19 +3517,19 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) case GFC_ISYM_INT2: case GFC_ISYM_INT8: case GFC_ISYM_LONG: - gfc_conv_intrinsic_int (se, expr, FIX_TRUNC_EXPR); + gfc_conv_intrinsic_int (se, expr, RND_TRUNC); break; case GFC_ISYM_NINT: - gfc_conv_intrinsic_int (se, expr, FIX_ROUND_EXPR); + gfc_conv_intrinsic_int (se, expr, RND_ROUND); break; case GFC_ISYM_CEILING: - gfc_conv_intrinsic_int (se, expr, FIX_CEIL_EXPR); + gfc_conv_intrinsic_int (se, expr, RND_CEIL); break; case GFC_ISYM_FLOOR: - gfc_conv_intrinsic_int (se, expr, FIX_FLOOR_EXPR); + gfc_conv_intrinsic_int (se, expr, RND_FLOOR); break; case GFC_ISYM_MOD: |