diff options
Diffstat (limited to 'libstdc++-v3/testsuite/26_numerics')
3 files changed, 89 insertions, 1 deletions
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 index 00000000000..16a78963e6c --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc @@ -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(); +} diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc index 5799344738c..06dd132babe 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc @@ -20,7 +20,7 @@ // { dg-do compile } // { dg-add-options no_pch } -// { dg-xfail-if "" { { *-*-linux* *-*-gnu* *-*-darwin* *-*-solaris2.1[0-9]* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } { "*" } { "" } } +// { dg-xfail-if "" { { *-*-linux* *-*-gnu* *-*-darwin* *-*-solaris2.10* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } { "*" } { "" } } // { dg-excess-errors "" { target { { *-*-linux* *-*-gnu* *-*-darwin* *-*-solaris2.1[0-9]* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } } } #include <math.h> diff --git a/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc b/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc new file mode 100644 index 00000000000..ef9826778cf --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/valarray/69116.cc @@ -0,0 +1,53 @@ +// 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-do compile } +// { dg-options "-std=gnu++98" } + +// libstdc++/69116 + +#include <exception> +#include <valarray> + +template<typename T> + void foo(const T&) { } + +struct X : std::exception // makes namespace std an associated namespace +{ + virtual void pure() = 0; + + typedef void(*func_type)(const X&); + + void operator+(func_type) const; + void operator-(func_type) const; + void operator*(func_type) const; + void operator/(func_type) const; + void operator%(func_type) const; + void operator<<(func_type) const; + void operator>>(func_type) const; +}; + +void foo(X& x) +{ + x + foo; + x - foo; + x * foo; + x / foo; + x % foo; + x << foo; + x >> foo; +} |