]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add test for PR 60637
authorJonathan Wakely <jwakely@redhat.com>
Mon, 18 Jan 2016 17:15:42 +0000 (17:15 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 18 Jan 2016 17:15:42 +0000 (17:15 +0000)
PR libstdc++/60637
* testsuite/26_numerics/headers/cmath/60637.cc: Add test.

From-SVN: r232534

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc [new file with mode: 0644]

index b17f595097f2f0a6a3a0a05d67b616623508d592..0b7ca1b685253ed5351d46081033a246cc12cc1c 100644 (file)
@@ -1,5 +1,8 @@
 2016-01-18  Jonathan Wakely  <jwakely@redhat.com>
 
+       PR libstdc++/60637
+       * testsuite/26_numerics/headers/cmath/60637.cc: Add test.
+
        PR libstdc++/69243
        * include/std/functional (_Function_base::_M_not_empty_function):
        Change overloads for pointers to take arguments by value.
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc
new file mode 100644 (file)
index 0000000..16a7896
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2016 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++98 -ffast-math" }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+
+#include <cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  long double ld = -5.3165867831218916301793863361917824e-2467L;
+  VERIFY( std::signbit(ld) == 1 );
+}
+
+int
+main()
+{
+  test01();
+}