2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / 387-rint-inline-2.c
blobbe765a7a39fe2fd9712ddb7761bccdb924699dcb
1 /* Test rint and related functions expanded inline for 387. rint
2 should be expanded even when spurious "inexact" not allowed. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -mfancy-math-387 -mfpmath=387 -fno-fp-int-builtin-inexact" } */
5 /* { dg-add-options c99_runtime } */
7 #define TEST(FN, TYPE) \
8 do \
9 { \
10 volatile TYPE a = 1.5, b; \
11 b = FN (a); \
12 } \
13 while (0)
15 #define FN_TESTS(FN) \
16 do \
17 { \
18 TEST (__builtin_ ## FN, double); \
19 TEST (__builtin_ ## FN ## f, float); \
20 TEST (__builtin_ ## FN ## l, long double); \
21 } \
22 while (0)
24 void
25 test (void)
27 FN_TESTS (rint);
30 /* { dg-final { scan-assembler-not "\[ \t\]rint" } } */