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 
6 #define TEST(FN, TYPE)				\
7   do						\
8     {						\
9       volatile TYPE a = 1.5, b;			\
10       b = FN (a);				\
11     }						\
12   while (0)
13 
14 #define FN_TESTS(FN)					\
15   do							\
16     {							\
17       TEST (__builtin_ ## FN, double);			\
18       TEST (__builtin_ ## FN ## f, float);		\
19       TEST (__builtin_ ## FN ## l, long double);	\
20     }							\
21   while (0)
22 
23 void
test(void)24 test (void)
25 {
26   FN_TESTS (rint);
27 }
28 
29 /* { dg-final { scan-assembler-not "\[ \t\]rint" } } */
30