diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-16 00:42:11 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-16 00:42:11 +0000 |
commit | 97bb28494500b9d33b0aba1d9b429a753aab8ace (patch) | |
tree | 27124f097b1f1b28de1e3429a91b3725b2071fb6 /gcc/testsuite/g++.dg/eh | |
parent | 5243766ec2347b4a099e8f6d09157af46900aae4 (diff) | |
download | gcc-97bb28494500b9d33b0aba1d9b429a753aab8ace.tar.gz |
./:
* lower-subreg.c (move_eh_region_note): New static function.
(resolve_simple_move): Call it.
(decompose_multiword_subregs): Track blocks for which we resolve a
simple move which is also a control flow insn. Pass them to
find_many_sub_basic_blocks.
(pass_lower_subreg): Add TODO_verify_flow.
(pass_lower_subreg2): Likewise.
testsuite/:
* g++.dg/eh/subreg-1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122025 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/eh')
-rw-r--r-- | gcc/testsuite/g++.dg/eh/subreg-1.C | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/eh/subreg-1.C b/gcc/testsuite/g++.dg/eh/subreg-1.C new file mode 100644 index 00000000000..1ac976dae61 --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/subreg-1.C @@ -0,0 +1,41 @@ +/* The lower-subreg pass would ICE on this test case with + TODO_verify_flow on 32-bit PowerPC. It didn't handle REG_EH_REGION + notes correctly. This is reduced from interpret.cc in libjava. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fnon-call-exceptions" } */ + +union _Jv_word +{ + double *o; + int i; + int ia[1]; +}; +union _Jv_word2 +{ + int ia[2]; + double d; +}; + +class _Jv_InterpMethod +{ + static void run_debug (_Jv_word *); +}; + +void +_Jv_InterpMethod::run_debug (_Jv_word *sp) +{ + try + { + { + int index = ((int) (--sp)->i); + double *arr = (double *) ((--sp)->o); + _Jv_word2 w2; + w2.d = arr[index]; + (sp++)->ia[0] = w2.ia[0]; + } + } + catch (int * ex) + { + } +} |