diff options
| author | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-30 20:33:34 +0000 |
|---|---|---|
| committer | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-30 20:33:34 +0000 |
| commit | d3f33ef28711e6e6be633a9cc3edf369fc9309ab (patch) | |
| tree | 8c1a6b691af8f0a648c955da86420225030dd8f7 /gcc/fold-const.c | |
| parent | 3c66b59ebd0f6cce6a7ccb838c486cbfdb711df7 (diff) | |
| download | ppe42-gcc-d3f33ef28711e6e6be633a9cc3edf369fc9309ab.tar.gz ppe42-gcc-d3f33ef28711e6e6be633a9cc3edf369fc9309ab.zip | |
2004-11-30 Eric Christopher <echristo@redhat.com>
* fold-const.c (fold_widened_comparison): Make sure that we're
passing an INTEGER_TYPE to int_fits_type_p.
(fold): Clean up comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91539 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
| -rw-r--r-- | gcc/fold-const.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 98b827eafdb..8ddb039c52f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -6000,6 +6000,7 @@ fold_widened_comparison (enum tree_code code, tree type, tree arg0, tree arg1) || TYPE_UNSIGNED (TREE_TYPE (arg0)) == TYPE_UNSIGNED (shorter_type)) && (TREE_TYPE (arg1_unw) == shorter_type || (TREE_CODE (arg1_unw) == INTEGER_CST + && TREE_CODE (shorter_type) == INTEGER_TYPE && int_fits_type_p (arg1_unw, shorter_type)))) return fold (build (code, type, arg0_unw, fold_convert (shorter_type, arg1_unw))); @@ -8428,9 +8429,8 @@ fold (tree expr) /* Comparisons with the highest or lowest possible integer of the specified size will have known values. - This is quite similar to fold_relational_hi_lo; however, my - attempts to share the code have been nothing but trouble. - I give up for now. */ + This is quite similar to fold_relational_hi_lo, however, + attempts to share the code have been nothing but trouble. */ { int width = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (arg1))); |

