aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/s390/pr57960.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/s390/pr57960.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/s390/pr57960.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/s390/pr57960.c b/gcc-4.9/gcc/testsuite/gcc.target/s390/pr57960.c
new file mode 100644
index 000000000..ee751edc8
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/s390/pr57960.c
@@ -0,0 +1,30 @@
+/* PR rtl-optimization/57960 */
+
+/* { dg-do compile } */
+/* { dg-options "-march=z10 -m64 -mzarch -O1" } */
+
+typedef union
+{
+ long double value;
+ struct
+ {
+ unsigned int w0, w1, w2, w3;
+ }
+ parts32;
+}
+ ieee854_long_double_shape_type;
+static const long double one = 1.0L;
+long double
+__ieee754_acosl (long double x)
+{
+ long double z, w;
+ int ix;
+ ieee854_long_double_shape_type u;
+
+ z = (one - u.value) * 0.5;
+ u.parts32.w2 = 0;
+ u.parts32.w3 = 0;
+ w = z - u.value * u.value;
+ return 2.0 * w;
+
+}