diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-16 05:47:20 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-16 05:47:20 +0000 |
commit | 05d63fcfcf0fb9292d55a2fa6e7cbf2129c3e265 (patch) | |
tree | 03800353a564c0cdcf3c12bb8940b28389b243a9 /libgo/runtime/go-panic.c | |
parent | 13197b1a99dbd7aa34765380ab7a38b4da4d254e (diff) | |
download | gcc-05d63fcfcf0fb9292d55a2fa6e7cbf2129c3e265.tar.gz |
Fix defer when not calling recover in function with named results.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178905 138bc75d-0d04-0410-961f-82ee72b054a4
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 b684779cda8..c39ea9f9303 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; |