]>
Commit | Line | Data |
---|---|---|
b39d0359 LR |
1 | // Inspired by libstdc++/7680 & 26_numerics/c_math.cc, 2003-04-12 ljr |
2 | ||
7adcbafe | 3 | // Copyright (C) 2003-2022 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 } | |
75a8a745 | 22 | // { dg-options "-D_XOPEN_SOURCE" { target *-*-freebsd* *-*-dragonfly* } } |
b39d0359 LR |
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; | |
11f10e6b | 39 | float b __attribute__((unused)) = std::acos(a); |
b39d0359 LR |
40 | return 0; |
41 | } | |
42 | ||
43 | int | |
44 | main() | |
45 | { | |
46 | test01(); | |
47 | test02(); | |
48 | return 0; | |
49 | } |