diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2014-05-06 16:25:05 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2014-05-06 16:25:05 +0000 |
commit | 807e902eea17f3132488c256c963823976b2348c (patch) | |
tree | e5e1af94eb1502ba893bd6ce4a11f68877ff62a9 /gcc/fortran/trans-const.c | |
parent | 6122336c832dc4dfedc49279549caddce86306ff (diff) | |
download | gcc-807e902eea17f3132488c256c963823976b2348c.zip gcc-807e902eea17f3132488c256c963823976b2348c.tar.gz gcc-807e902eea17f3132488c256c963823976b2348c.tar.bz2 |
Merge in wide-int.
From-SVN: r210113
Diffstat (limited to 'gcc/fortran/trans-const.c')
-rw-r--r-- | gcc/fortran/trans-const.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c index a2c3e31..6c54e20 100644 --- a/gcc/fortran/trans-const.c +++ b/gcc/fortran/trans-const.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "trans-const.h" #include "trans-types.h" #include "target-memory.h" +#include "wide-int.h" tree gfc_rank_cst[GFC_MAX_DIMENSIONS + 1]; @@ -145,8 +146,7 @@ gfc_conv_string_init (tree length, gfc_expr * expr) gcc_assert (expr->expr_type == EXPR_CONSTANT); gcc_assert (expr->ts.type == BT_CHARACTER); - gcc_assert (INTEGER_CST_P (length)); - gcc_assert (TREE_INT_CST_HIGH (length) == 0); + gcc_assert (tree_fits_uhwi_p (length)); len = TREE_INT_CST_LOW (length); slen = expr->value.character.length; @@ -201,8 +201,8 @@ gfc_init_constants (void) tree gfc_conv_mpz_to_tree (mpz_t i, int kind) { - double_int val = mpz_get_double_int (gfc_get_int_type (kind), i, true); - return double_int_to_tree (gfc_get_int_type (kind), val); + wide_int val = wi::from_mpz (gfc_get_int_type (kind), i, true); + return wide_int_to_tree (gfc_get_int_type (kind), val); } /* Converts a backend tree into a GMP integer. */ @@ -210,8 +210,7 @@ gfc_conv_mpz_to_tree (mpz_t i, int kind) void gfc_conv_tree_to_mpz (mpz_t i, tree source) { - double_int val = tree_to_double_int (source); - mpz_set_double_int (i, val, TYPE_UNSIGNED (TREE_TYPE (source))); + wi::to_mpz (source, i, TYPE_SIGN (TREE_TYPE (source))); } /* Converts a real constant into backend form. */ |