Commit f7a10f0d by Ian Lance Taylor

Don't crash if erroneous type was not converted.

From-SVN: r170646
parent e2e280a3
......@@ -7300,7 +7300,12 @@ Named_type::do_get_tree(Gogo* gogo)
// We are not converting types. This should only be called if the
// type has already been converted.
gcc_assert(this->is_converted_);
if (!this->is_converted_)
{
gcc_assert(saw_errors());
return error_mark_node;
}
gcc_assert(t != NULL_TREE && TYPE_SIZE(t) != NULL_TREE);
// Complete the tree.
......
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