diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-14 18:48:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-14 18:48:08 +0000 |
commit | 4d7b770603105640aca8c40b9bcdf7416eceed37 (patch) | |
tree | 0dc70e83086aee3a21cc80901864a27873f5f719 /gcc | |
parent | ebb077fc775ca085013742c10fc4273ad600ce6f (diff) | |
download | gcc-4d7b770603105640aca8c40b9bcdf7416eceed37.zip gcc-4d7b770603105640aca8c40b9bcdf7416eceed37.tar.gz gcc-4d7b770603105640aca8c40b9bcdf7416eceed37.tar.bz2 |
Fix defer/recover at high optimization levels.
From-SVN: r178859
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/gogo-tree.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc index ed211e9..fbddc04 100644 --- a/gcc/go/gofrontend/gogo-tree.cc +++ b/gcc/go/gofrontend/gogo-tree.cc @@ -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 // can't inline it, because recover behaves differently in a - // function passed directly to defer. - if (this->calls_recover_ && !this->is_recover_thunk_) + // function passed directly to defer. If this is a recover + // 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; // If this is a thunk created to call a function which calls |