Testcase for emit_group_store patch.
authorJim Wilson <wilson@cygnus.com>
Wed, 7 Oct 1998 12:07:52 +0000 (12:07 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 7 Oct 1998 12:07:52 +0000 (05:07 -0700)
* gcc.c-torture/compile/981007-1.c: New test for irix6 -O0 core dump.

From-SVN: r22892

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/981007-1.c [new file with mode: 0644]

index f4b1b58c1d0375d0f8820d1ce6862ede4b57df4b..f038a885afc6e03f796462b94b8cee86e28846e0 100644 (file)
@@ -1,3 +1,7 @@
+Wed Oct  7 12:00:20 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * gcc.c-torture/compile/981007-1.c: New test for irix6 -O0 core dump.
+
 1998-10-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * g++.old-deja/g++.pt/friend35.C: New test.  A template function
diff --git a/gcc/testsuite/gcc.c-torture/compile/981007-1.c b/gcc/testsuite/gcc.c-torture/compile/981007-1.c
new file mode 100644 (file)
index 0000000..d41400b
--- /dev/null
@@ -0,0 +1,21 @@
+extern double fabs (double);
+extern double sqrt (double);
+
+typedef struct complexm {
+  double re,im;
+} complex;
+
+static complex
+setCom (double r, double i)
+{
+  complex ct;
+  ct.re=fabs(r)<1E-300?0.0:r;
+  ct.im=fabs(i)<1E-300?0.0:i;
+  return ct;
+}
+
+static complex
+csqrt_crash (double x)
+{
+  return (x>=0) ? setCom(sqrt(x),0) : setCom(0,sqrt(-x));
+}