diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 05:47:20 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 05:47:20 +0000 |
commit | b9f04a8461a67148848258f8e4b367a1b988038e (patch) | |
tree | 03800353a564c0cdcf3c12bb8940b28389b243a9 /libgo/runtime/go-panic.c | |
parent | fae3f4598af23b48fed264052e33d5516e31a56c (diff) | |
download | gcc-b9f04a8461a67148848258f8e4b367a1b988038e.zip gcc-b9f04a8461a67148848258f8e4b367a1b988038e.tar.gz gcc-b9f04a8461a67148848258f8e4b367a1b988038e.tar.bz2 |
Fix defer when not calling recover in function with named results.
From-SVN: r178905
Diffstat (limited to 'libgo/runtime/go-panic.c')
-rw-r--r-- | libgo/runtime/go-panic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/runtime/go-panic.c b/libgo/runtime/go-panic.c index b684779..c39ea9f 100644 --- a/libgo/runtime/go-panic.c +++ b/libgo/runtime/go-panic.c @@ -87,6 +87,12 @@ __go_panic (struct __go_empty_interface arg) /* __go_unwind_stack should not return. */ abort (); } + + /* Because we executed that defer function by a panic, and + it did not call recover, we know that we are not + returning from the calling function--we are panicing + through it. */ + *d->__frame = 0; } __go_panic_defer->__defer = d->__next; |