]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/26_numerics/headers/cmath/c_math_dynamic.cc
Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 26_numerics / headers / cmath / c_math_dynamic.cc
CommitLineData
b39d0359
LR
1// Inspired by libstdc++/7680 & 26_numerics/c_math.cc, 2003-04-12 ljr
2
748086b7 3// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
b39d0359
LR
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
748086b7 8// Free Software Foundation; either version 3, or (at your option)
b39d0359
LR
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License along
748086b7
JJ
17// with this library; see the file COPYING3. If not see
18// <http://www.gnu.org/licenses/>.
19
b39d0359
LR
20
21// { dg-do link }
22// { dg-options "-D_XOPEN_SOURCE" { target *-*-freebsd* } }
23
24#include <cmath>
25
26int
27test01()
28{
29 float a = 1.f;
30 float b;
31 std::modf(a, &b);
32 return 0;
33}
34
35int
36test02 ()
37{
38 float a = 0.0f;
11f10e6b 39 float b __attribute__((unused)) = std::acos(a);
b39d0359
LR
40 return 0;
41}
42
43int
44main()
45{
46 test01();
47 test02();
48 return 0;
49}