aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2003-04-01 19:18:24 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2003-04-01 19:18:24 +0000
commit705412b04b8325c87f5ef62ff42e2064d784c7e4 (patch)
treedd2c740e8339d7d429acbaade44af9731e042727
parent7d4444ea03094bc9ce7f683f14be6d9cd7969ede (diff)
downloadgcc-705412b04b8325c87f5ef62ff42e2064d784c7e4.zip
gcc-705412b04b8325c87f5ef62ff42e2064d784c7e4.tar.gz
gcc-705412b04b8325c87f5ef62ff42e2064d784c7e4.tar.bz2
simd-1.C: New.
2003-04-01 Aldy Hernandez <aldyh@redhat.com> * g++.dg/eh/simd-1.C: New. * g++.dg/eh/simd-2.C: New. From-SVN: r65138
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/g++.dg/eh/simd-1.C49
-rw-r--r--gcc/testsuite/g++.dg/eh/simd-2.C46
3 files changed, 102 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2bae494..f8cb3ba 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,12 @@
+2003-04-01 Aldy Hernandez <aldyh@redhat.com>
+
+ * g++.dg/eh/simd-1.C: New.
+
+ * g++.dg/eh/simd-2.C: New.
+
2003-03-01 Aldy Hernandez <aldyh@redhat.com>
- * testsuite/gcc.c-torture/execute/simd-3.c: New.
+ * gcc.c-torture/execute/simd-3.c: New.
2003-03-31 Mark Mitchell <mark@codesourcery.com>
diff --git a/gcc/testsuite/g++.dg/eh/simd-1.C b/gcc/testsuite/g++.dg/eh/simd-1.C
new file mode 100644
index 0000000..bfb0c80
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/simd-1.C
@@ -0,0 +1,49 @@
+// Test EH when V2SI SIMD registers are involved.
+// Contributed by Aldy Hernandez (aldy@quesejoda.com).
+// { dg-options "-O" }
+// { dg-do run }
+
+typedef int __attribute__((mode(V2SI))) vecint;
+
+vecint vecfunc (vecint beachbum)
+{
+ return vecint;
+}
+
+void f3 (void)
+{
+ /* Force a use of a V2SI register if available. On the PPC/E500,
+ this will cause the compiler to save the registers in this
+ function in 64-bits. */
+ vecint foobar = (vecint) {0, 0};
+ foobar = vecfunc (foobar);
+
+ throw int();
+}
+
+void f2 (void)
+{
+ vecint foobar = (vecint) {0, 0};
+ foobar = vecfunc (foobar);
+
+ f3 ();
+}
+
+void f1 (void)
+{
+ int i;
+ try
+ {
+ f2 ();
+ }
+ catch (int)
+ {
+ i = 9;
+ }
+}
+
+int main ()
+{
+ f1 ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/eh/simd-2.C b/gcc/testsuite/g++.dg/eh/simd-2.C
new file mode 100644
index 0000000..75d59d7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/simd-2.C
@@ -0,0 +1,46 @@
+// Test EH when V4SI SIMD registers are involved.
+// Contributed by Aldy Hernandez (aldy@quesejoda.com).
+// { dg-options "-O" }
+// { dg-do run }
+
+typedef int __attribute__((mode(V4SI))) vecint;
+
+vecint vecfunc (vecint beachbum)
+{
+ return vecint;
+}
+
+void f3 (void)
+{
+ vecint foobar = (vecint) {0, 0};
+ foobar = vecfunc (foobar);
+
+ throw int();
+}
+
+void f2 (void)
+{
+ vecint foobar = (vecint) {0, 0};
+ foobar = vecfunc (foobar);
+
+ f3 ();
+}
+
+void f1 (void)
+{
+ int i;
+ try
+ {
+ f2 ();
+ }
+ catch (int)
+ {
+ i = 9;
+ }
+}
+
+int main ()
+{
+ f1 ();
+ return 0;
+}