From: ian Date: Mon, 7 May 2012 18:36:36 +0000 (+0000) Subject: compiler: fix ICE in handling of rune constants. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8387e1df5a97c8edbd3bf48fcc59aab3fb5ff9d6;p=thirdparty%2Fgcc.git 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/trunk@187264 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 39824bfcb6f8..f6fb65866f00 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);