re PR target/36090 (ppc64 cacoshl miscompilation)
authorJakub Jelinek <jakub@redhat.com>
Sun, 18 May 2008 20:19:03 +0000 (22:19 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 18 May 2008 20:19:03 +0000 (22:19 +0200)
PR target/36090
* gcc.c-torture/execute/20080502-1.c: New test.

From-SVN: r135508

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

index 0e67e25c75594804c134ac6a3234f91dba240329..4f115c3ef19227d25a7b54f847109d4809edbfa6 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-18  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/36090
+       * gcc.c-torture/execute/20080502-1.c: New test.
+
 2008-05-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        * gfortran.dg/stat_1.f90: Skip on mingw.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20080502-1.c b/gcc/testsuite/gcc.c-torture/execute/20080502-1.c
new file mode 100644 (file)
index 0000000..ed9b208
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR target/36090 */
+
+extern void abort (void);
+
+long double __attribute__ ((noinline)) foo (long double x)
+{
+  return __builtin_signbit (x) ? 3.1415926535897932384626433832795029L : 0.0;
+}
+
+int
+main (void)
+{
+  if (foo (-1.0L) != 3.1415926535897932384626433832795029L)
+    abort ();
+  return 0;
+}