From: ian Date: Mon, 7 May 2012 18:37:00 +0000 (+0000) Subject: compiler: fix ICE in handling of rune constants. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=e14f231592d0c4c5c1f819b0a7124e1e301f4cb8;ds=sidebyside 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@187265 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 39824bfcb6f..f6fb65866f0 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -3712,7 +3712,10 @@ Unary_expression::eval_constant(Operator op, const Numeric_constant* unc, return false; mpz_t uval; - unc->get_int(&uval); + if (unc->is_rune()) + unc->get_rune(&uval); + else + unc->get_int(&uval); mpz_t val; mpz_init(val);