aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2017-11-01 08:47:19 +0100
committerUros Bizjak <uros@gcc.gnu.org>2017-11-01 08:47:19 +0100
commit6e0cb45f0c11d30f03498039b2f650ead28658bd (patch)
treec17f968b496094ca78f0d0c6add78cc02c6c0be3 /gcc
parent78fd4c51f4d05692b35ec9be7162d2827f5e6ba5 (diff)
downloadgcc-6e0cb45f0c11d30f03498039b2f650ead28658bd.zip
gcc-6e0cb45f0c11d30f03498039b2f650ead28658bd.tar.gz
gcc-6e0cb45f0c11d30f03498039b2f650ead28658bd.tar.bz2
sqrt.c: New test.
* gcc.target/alpha/sqrt.c: New test. From-SVN: r254289
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog16
-rw-r--r--gcc/testsuite/gcc.target/alpha/sqrt.c25
2 files changed, 34 insertions, 7 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 68c4b26..a8143ad 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,8 +1,12 @@
+2017-11-01 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/alpha/sqrt.c: New test.
+
2017-10-31 Daniel Santos <daniel.santos@pobox.com>
- gcc.target/i386/pr82002-1.c: New test.
- gcc.target/i386/pr82002-2a.c: New xfail test.
- gcc.target/i386/pr82002-2b.c: New xfail test.
+ * gcc.target/i386/pr82002-1.c: New test.
+ * gcc.target/i386/pr82002-2a.c: New xfail test.
+ * gcc.target/i386/pr82002-2b.c: New xfail test.
2017-10-31 Martin Jambor <mjambor@suse.cz>
@@ -16,8 +20,7 @@
2017-10-31 David Malcolm <dmalcolm@redhat.com>
- * g++.dg/cpp0x/auto21.C: Update dg-error to reflect addition of
- quotes.
+ * g++.dg/cpp0x/auto21.C: Update dg-error to reflect addition of quotes.
* g++.dg/cpp0x/missing-initializer_list-include.C: Likewise.
2017-10-31 David Malcolm <dmalcolm@redhat.com>
@@ -35,8 +38,7 @@
2017-10-31 Martin Liska <mliska@suse.cz>
* g++.dg/gcov/ternary.C: New test.
- * g++.dg/gcov/gcov-threads-1.C (main): Update expected line
- count.
+ * g++.dg/gcov/gcov-threads-1.C (main): Update expected line count.
* lib/gcov.exp: Support new format for intermediate file format.
2017-11-01 Julia Koval <julia.koval@intel.com>
diff --git a/gcc/testsuite/gcc.target/alpha/sqrt.c b/gcc/testsuite/gcc.target/alpha/sqrt.c
new file mode 100644
index 0000000..a3c8b24
--- /dev/null
+++ b/gcc/testsuite/gcc.target/alpha/sqrt.c
@@ -0,0 +1,25 @@
+/* glibc bug, https://sourceware.org/ml/libc-alpha/2017-04/msg00256.html
+ When using software completions, we have to prevent assembler to match
+ input and output operands of sqrtt/sqrtf insn. Fixed in glibc 2.26. */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-builtin-sqrt -mieee" } */
+
+double sqrt (double);
+
+static double
+float64frombits (unsigned long b)
+{
+ union { unsigned long __b; double __d; } u = { .__b = b };
+ return u.__d;
+}
+
+int
+main (void)
+{
+ double a = float64frombits (2);
+
+ if (sqrt (a) != 3.1434555694052576e-162)
+ __builtin_abort ();
+
+ return 0;
+}