Message ID | mcrtx93rj5m.fsf@iant-glaptop.roam.corp.google.com |
---|---|
State | New |
Headers | show |
diff -r 1a6ec84147d3 go/expressions.cc --- a/go/expressions.cc Mon May 05 15:05:17 2014 -0400 +++ b/go/expressions.cc Mon May 05 17:08:57 2014 -0400 @@ -14095,9 +14095,13 @@ default: go_unreachable(); } - tree val_type_tree = type_to_tree(this->type()->get_backend(gogo)); - go_assert(val_type_tree != error_mark_node); - return build_int_cstu(val_type_tree, val); + mpz_t cst; + mpz_init_set_ui(cst, val); + Btype* int_btype = this->type()->get_backend(gogo); + Bexpression* ret = + gogo->backend()->integer_constant_expression(int_btype, cst); + mpz_clear(cst); + return expr_to_tree(ret); } // Dump ast representation for a type info expression.