aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-03-30 10:04:45 -0500
committerJason Merrill <jason@gcc.gnu.org>1999-03-30 10:04:45 -0500
commit85a0b07565f2c95a403df910f5d1ff7b2f9a462f (patch)
treea5f617a71d21da9e8f434b6ded133174a29d4e66 /gcc
parent51980de69e7a64092dd0053625869a66bec8e913 (diff)
downloadgcc-85a0b07565f2c95a403df910f5d1ff7b2f9a462f.zip
gcc-85a0b07565f2c95a403df910f5d1ff7b2f9a462f.tar.gz
gcc-85a0b07565f2c95a403df910f5d1ff7b2f9a462f.tar.bz2
new
From-SVN: r26067
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/unwind1.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C b/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
new file mode 100644
index 0000000..617b355
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
@@ -0,0 +1,24 @@
+// Test that unwinding properly restores SP.
+// Contributed by Jason Merrill <jason@cygnus.com>
+
+int f (int i)
+{
+ throw i;
+}
+
+int main ()
+{
+ void *sp1 = __builtin_alloca (0);
+
+ try
+ {
+ f (0);
+ }
+ catch (int)
+ {
+ }
+
+ void *sp2 = __builtin_alloca (0);
+
+ return (sp1 != sp2);
+}