Commit 1ed36e90 by Ian Lance Taylor

Don't crash if named constant has no type when converting to GENERIC.

From-SVN: r168483
parent 10d53f5d
......@@ -2680,7 +2680,8 @@ Const_expression::do_get_tree(Translate_context* context)
// object is an abstract int or float, we try to get the abstract
// value. Otherwise we may lose something in the conversion.
if (this->type_ != NULL
&& this->constant_->const_value()->type()->is_abstract())
&& (this->constant_->const_value()->type() == NULL
|| this->constant_->const_value()->type()->is_abstract()))
{
Expression* expr = this->constant_->const_value()->expr();
mpz_t ival;
......
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