From dd1af55f6a4a2fff73311aeaa8eb47fd775ab839 Mon Sep 17 00:00:00 2001 From: Stuart Hastings Date: Wed, 4 Apr 2007 18:37:14 +0000 Subject: [PATCH] re PR objc/31281 (ICE on ObjC try-catch blocks with next runtime) PR 31281 * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. * testsuite/objc/execute/exceptions/pr31281.m: New. From-SVN: r123501 --- gcc/objc/ChangeLog | 5 ++++ gcc/objc/objc-act.c | 3 +-- gcc/testsuite/ChangeLog | 5 ++++ .../objc/execute/exceptions/pr31281.m | 27 +++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/objc/execute/exceptions/pr31281.m diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 76c342854ad..eb2061a6975 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2007-04-04 Stuart Hastings + + PR 31281 + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + 2007-03-01 Brooks Moses * Make-lang.in: Add dummy lang.install-pdf target. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 0cbd759e9d4..19475e2f8d8 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -3642,7 +3642,7 @@ next_sjlj_build_catch_list (void) { struct _objc_exception_data _stack; - id volatile _rethrow = 0; + id _rethrow = 0; try { objc_exception_try_enter (&_stack); @@ -3686,7 +3686,6 @@ next_sjlj_build_try_catch_finally (void) rethrow_decl = objc_create_temporary_var (objc_object_type); cur_try_context->rethrow_decl = rethrow_decl; - TREE_THIS_VOLATILE (rethrow_decl) = 1; TREE_CHAIN (rethrow_decl) = stack_decl; /* Build the outermost variable binding level. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4a5ce3b4ce8..7ab79cbad97 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-04-04 Stuart Hastings + + PR 31281 + * testsuite/objc/execute/exceptions/pr31281.m: New. + 2007-04-04 Danny Smith * g++.dg/ext/dllimport12.C: Update comments. diff --git a/gcc/testsuite/objc/execute/exceptions/pr31281.m b/gcc/testsuite/objc/execute/exceptions/pr31281.m new file mode 100644 index 00000000000..41e7a8e16a4 --- /dev/null +++ b/gcc/testsuite/objc/execute/exceptions/pr31281.m @@ -0,0 +1,27 @@ +/* From PR31281. */ +extern void abort (void); +int __attribute__((noinline)) +f(unsigned int i) +{ + int j, k; + @try { } @catch(id) { return 13; } + for (j=0; j