diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 050942c..e9a26a0 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -7980,7 +7980,11 @@ Builtin_call_expression::do_get_tree(Translate_context* context) mpz_init(val); Type* dummy; bool b = this->integer_constant_value(true, val, &dummy); - gcc_assert(b); + if (!b) + { + gcc_assert(saw_errors()); + return error_mark_node; + } tree type = Type::lookup_integer_type("int")->get_tree(gogo); tree ret = Expression::integer_constant_tree(val, type); mpz_clear(val); |