Commit 63cc9deb by Ian Lance Taylor

Don't crash on bad receiver when building recover thunks.

From-SVN: r170452
parent 1b4d46a6
...@@ -2205,11 +2205,15 @@ Build_recover_thunks::function(Named_object* orig_no) ...@@ -2205,11 +2205,15 @@ Build_recover_thunks::function(Named_object* orig_no)
const std::string& new_receiver_name(orig_fntype->receiver()->name()); const std::string& new_receiver_name(orig_fntype->receiver()->name());
Named_object* new_rec_no = new_bindings->lookup_local(new_receiver_name); Named_object* new_rec_no = new_bindings->lookup_local(new_receiver_name);
gcc_assert(new_rec_no != NULL if (new_rec_no == NULL)
&& new_rec_no->is_variable() gcc_assert(saw_errors());
else
{
gcc_assert(new_rec_no->is_variable()
&& new_rec_no->var_value()->is_receiver()); && new_rec_no->var_value()->is_receiver());
new_rec_no->var_value()->set_is_not_receiver(); new_rec_no->var_value()->set_is_not_receiver();
} }
}
// Because we flipped blocks but not types, the can_recover // Because we flipped blocks but not types, the can_recover
// parameter appears in the (now) old bindings as a parameter. // parameter appears in the (now) old bindings as a parameter.
......
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