diff options
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 54d9f3b..6346004 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,8 @@ +2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> + + * gofrontend/expressions.cc: Replace host_integerp (..., 0) with + tree_fits_shwi_p throughout. + 2013-11-14 Andrew MacLeod <amacleod@redhat.com> * go-lang.c: Include only gimplify.h and gimple.h as needed. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 4d2fbfd..ca1bb98 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -3343,7 +3343,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context) tree int_type_tree = type_to_tree(int_type->get_backend(gogo)); expr_tree = fold_convert(int_type_tree, expr_tree); - if (host_integerp(expr_tree, 0)) + if (tree_fits_shwi_p (expr_tree)) { HOST_WIDE_INT intval = tree_low_cst(expr_tree, 0); std::string s; |