Commit ca30ba74 by Ian Lance Taylor

compiler: fix ICE in handling of rune constants.

This patch corrects an ICE in handling on constant expressions
such as

const r = ^'a'

Part of issue 9.

From-SVN: r187264
parent c414667b
...@@ -3712,7 +3712,10 @@ Unary_expression::eval_constant(Operator op, const Numeric_constant* unc, ...@@ -3712,7 +3712,10 @@ Unary_expression::eval_constant(Operator op, const Numeric_constant* unc,
return false; return false;
mpz_t uval; mpz_t uval;
unc->get_int(&uval); if (unc->is_rune())
unc->get_rune(&uval);
else
unc->get_int(&uval);
mpz_t val; mpz_t val;
mpz_init(val); mpz_init(val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment