Commit 4d7b7706 by Ian Lance Taylor

Fix defer/recover at high optimization levels.

From-SVN: r178859
parent ebb077fc
...@@ -1159,8 +1159,11 @@ Function::get_or_make_decl(Gogo* gogo, Named_object* no, tree id) ...@@ -1159,8 +1159,11 @@ Function::get_or_make_decl(Gogo* gogo, Named_object* no, tree id)
// If a function calls the predeclared recover function, we // If a function calls the predeclared recover function, we
// can't inline it, because recover behaves differently in a // can't inline it, because recover behaves differently in a
// function passed directly to defer. // function passed directly to defer. If this is a recover
if (this->calls_recover_ && !this->is_recover_thunk_) // thunk that we built to test whether a function can be
// recovered, we can't inline it, because that will mess up
// our return address comparison.
if (this->calls_recover_ || this->is_recover_thunk_)
DECL_UNINLINABLE(decl) = 1; DECL_UNINLINABLE(decl) = 1;
// If this is a thunk created to call a function which calls // If this is a thunk created to call a function which calls
......
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