1 /* { dg-do link } */
2 /* { dg-add-options float128 } */
3 /* { dg-require-effective-target float128 } */
4 
5 extern int link_error (int);
6 
7 #define TEST(FN, VALUE, RESULT) \
8   if (__builtin_##FN##f128 (VALUE) != RESULT) link_error (__LINE__);
9 
10 int
main(void)11 main (void)
12 {
13   TEST(roundeven,  (0x1p64+0.5f128), (0x1p64f128));
14   TEST(roundeven,  (0x1p63+0.5f128), (0x1p63f128));
15   TEST(roundeven,  (0x1p63-0.5f128), (0x1p63f128));
16   TEST(roundeven,  (0x1p64-0.5f128), (0x1p64f128));
17   TEST(roundeven,  (0x1p64+0.501f128), (0x1p64+1.0f128));
18   TEST(roundeven,  (0x1.C00000000000039A5653p1f128), (0x1p2f128))
19   return 0;
20 }
21 
22