]>
Commit | Line | Data |
---|---|---|
877cc28c | 1 | /* { dg-do link } */ |
67dbe582 | 2 | /* { dg-options "-std=c99 -ffinite-math-only -O" } */ |
e1502f6e | 3 | |
877cc28c RG |
4 | #include "builtins-config.h" |
5 | ||
6 | extern void link_error (void); | |
7 | ||
8 | extern double floor (double); | |
9 | extern double trunc (double); | |
10 | extern double fabs (double); | |
11 | ||
12 | void test (double x) | |
e1502f6e | 13 | { |
877cc28c RG |
14 | #ifdef HAVE_C99_RUNTIME |
15 | if (floor (fabs (x)) != trunc (fabs (x))) | |
16 | link_error (); | |
17 | #endif | |
18 | if (__builtin_lfloor (fabs (x)) != (long)fabs (x)) | |
19 | link_error (); | |
e1502f6e RG |
20 | } |
21 | ||
877cc28c | 22 | int main (void) |
e1502f6e | 23 | { |
877cc28c | 24 | return 0; |
e1502f6e | 25 | } |