diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-07-23 12:51:00 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-07-23 06:51:00 -0600 |
commit | 71bca5068d4491157020bdb8a11723787c22f054 (patch) | |
tree | cc96ed34cd44828875bd82215d197a7cd6d76ff8 /gcc | |
parent | 57b630a92b177b86947de8e3e14877b75e33634a (diff) | |
download | gcc-71bca5068d4491157020bdb8a11723787c22f054.zip gcc-71bca5068d4491157020bdb8a11723787c22f054.tar.gz gcc-71bca5068d4491157020bdb8a11723787c22f054.tar.bz2 |
expr.c (check_max_integer_computation_mode): Allow conversions of constant integers to MAX_INTEGER_COMPUTATION_MODE.
* expr.c (check_max_integer_computation_mode): Allow conversions
of constant integers to MAX_INTEGER_COMPUTATION_MODE.
(expand_expr): Likewise.
From-SVN: r21349
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/expr.c | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d225ce4..f3e1fcc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Thu Jul 23 13:49:41 1998 Jeffrey A Law (law@cygnus.com) + + * expr.c (check_max_integer_computation_mode): Allow conversions + of constant integers to MAX_INTEGER_COMPUTATION_MODE. + (expand_expr): Likewise. + Thu Jul 23 11:12:06 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (expand_expr): Expand RETURN_EXPR. @@ -5069,6 +5069,11 @@ check_max_integer_computation_mode (exp) enum tree_code code = TREE_CODE (exp); enum machine_mode mode; + /* We must allow conversions of constants to MAX_INTEGER_COMPUTATION_MODE. */ + if (code == NOP_EXPR + && TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST) + return; + /* First check the type of the overall operation. We need only look at unary, binary and relational operations. */ if (TREE_CODE_CLASS (code) == '1' @@ -5229,7 +5234,7 @@ expand_expr (exp, target, tmode, modifier) } #ifdef MAX_INTEGER_COMPUTATION_MODE - if (target) + if (target && TREE_CODE (exp) != INTEGER_CST) { enum machine_mode mode = GET_MODE (target); @@ -5238,7 +5243,8 @@ expand_expr (exp, target, tmode, modifier) fatal ("unsupported wide integer operation"); } - if (GET_MODE_CLASS (tmode) == MODE_INT + if (TREE_CODE (exp) != INTEGER_CST + && GET_MODE_CLASS (tmode) == MODE_INT && tmode > MAX_INTEGER_COMPUTATION_MODE) fatal ("unsupported wide integer operation"); |