aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2012-05-15 14:03:04 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2012-05-15 14:03:04 +0000
commit7d67c380fab04773732b6b0494cf8ab22cc2d126 (patch)
tree0575010987982fd59a3c499cb0ae2429400bb409 /gcc
parent7d80ca1f439cd6be490336659740ca6d8a06db40 (diff)
downloadgcc-7d67c380fab04773732b6b0494cf8ab22cc2d126.zip
gcc-7d67c380fab04773732b6b0494cf8ab22cc2d126.tar.gz
gcc-7d67c380fab04773732b6b0494cf8ab22cc2d126.tar.bz2
aix-unwind.h (*_REGNO): New, set of useful register numbers.
libgcc/ * config/rs6000/aix-unwind.h (*_REGNO): New, set of useful register numbers. LR_REGNO replaces R_LR. (ucontext_for): New, helper for ... (ppc_aix_fallback_frame_state): New, implementation for aix 5.2 and 5.3 of ... (MD_FALLBACK_FRAME_STATE_FOR): Define for 32bit configurations. testsuite/ * g++.dg/eh/sighandle.C: New testcase. From-SVN: r187540
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/eh/sighandle.C38
2 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8e82b01..0c7e44a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-15 Olivier Hainque <hainque@adacore.com>
+
+ * g++.dg/eh/sighandle.C: New testcase.
+
2012-05-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53355
diff --git a/gcc/testsuite/g++.dg/eh/sighandle.C b/gcc/testsuite/g++.dg/eh/sighandle.C
new file mode 100644
index 0000000..e516ad0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/sighandle.C
@@ -0,0 +1,38 @@
+// { dg-do run { target { *-*-aix5* i?86-*-linux* x86_64-*-linux* } } }
+// { dg-options "-fexceptions -fnon-call-exceptions" }
+
+#include <signal.h>
+#include <stdlib.h>
+
+void sighandler (int signo, siginfo_t * si, void * uc)
+{
+ throw (5);
+}
+
+char * dosegv ()
+{
+ * ((volatile int *)0) = 12;
+}
+
+int main ()
+{
+ struct sigaction sa;
+ int status;
+
+ sa.sa_sigaction = sighandler;
+ sa.sa_flags = SA_SIGINFO;
+
+ status = sigaction (SIGSEGV, & sa, NULL);
+ status = sigaction (SIGBUS, & sa, NULL);
+
+ try {
+ dosegv ();
+ }
+ catch (int x) {
+ return (x != 5);
+ }
+
+ return 1;
+}
+
+