]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/26_numerics/headers/cmath/c_math_dynamic.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 26_numerics / headers / cmath / c_math_dynamic.cc
1 // Inspired by libstdc++/7680 & 26_numerics/c_math.cc, 2003-04-12 ljr
2
3 // Copyright (C) 2003-2023 Free Software Foundation, Inc.
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
8 // Free Software Foundation; either version 3, or (at your option)
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
17 // with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
19
20
21 // { dg-do link }
22 // { dg-options "-D_XOPEN_SOURCE" { target *-*-freebsd* *-*-dragonfly* } }
23
24 #include <cmath>
25
26 int
27 test01()
28 {
29 float a = 1.f;
30 float b;
31 std::modf(a, &b);
32 return 0;
33 }
34
35 int
36 test02 ()
37 {
38 float a = 0.0f;
39 float b __attribute__((unused)) = std::acos(a);
40 return 0;
41 }
42
43 int
44 main()
45 {
46 test01();
47 test02();
48 return 0;
49 }