aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/expressions.cc')
-rw-r--r--gcc/go/gofrontend/expressions.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index ca1bb98..823c5e1 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -3345,7 +3345,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
expr_tree = fold_convert(int_type_tree, expr_tree);
if (tree_fits_shwi_p (expr_tree))
{
- HOST_WIDE_INT intval = tree_low_cst(expr_tree, 0);
+ HOST_WIDE_INT intval = tree_to_shwi (expr_tree);
std::string s;
Lex::append_char(intval, true, &s, this->location());
Expression* se = Expression::make_string(s, this->location());