summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/builtins-46.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtins-46.c')
-rw-r--r--gcc/testsuite/gcc.dg/builtins-46.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/builtins-46.c b/gcc/testsuite/gcc.dg/builtins-46.c
index 67c979f73f0..3a955a56929 100644
--- a/gcc/testsuite/gcc.dg/builtins-46.c
+++ b/gcc/testsuite/gcc.dg/builtins-46.c
@@ -1,6 +1,7 @@
/* Copyright (C) 2004 Free Software Foundation.
- Check that rint, rintf, rintl, floor, floorf, floorl,
+ Check that rint, rintf, rintl, lrint, lrintf, lrintl,
+ llrint, llrintf, llrintl, floor, floorf, floorl,
ceil, ceilf, ceill, trunc, truncf, truncl,
nearbyint, nearbyintf and nearbyintl
built-in functions compile.
@@ -11,18 +12,24 @@
/* { dg-options "-O2 -ffast-math" } */
extern double rint(double);
+extern long int lrint(double);
+extern long long int llrint(double);
extern double floor(double);
extern double ceil(double);
extern double trunc(double);
extern double nearbyint(double);
extern float rintf(float);
+extern long int lrintf(float);
+extern long long int llrintf(float);
extern float floorf(float);
extern float ceilf(float);
extern float truncf(float);
extern float nearbyintf(float);
extern long double rintl(long double);
+extern long int lrintl(long double);
+extern long long int llrintl(long double);
extern long double floorl(long double);
extern long double ceill(long double);
extern long double truncl(long double);
@@ -34,6 +41,16 @@ double test1(double x)
return rint(x);
}
+long int test11(double x)
+{
+ return lrint(x);
+}
+
+long long int test12(double x)
+{
+ return llrint(x);
+}
+
double test2(double x)
{
return floor(x);
@@ -59,6 +76,16 @@ float test1f(float x)
return rintf(x);
}
+long int test11f(float x)
+{
+ return lrintf(x);
+}
+
+long long int test12f(float x)
+{
+ return llrintf(x);
+}
+
float test2f(float x)
{
return floorf(x);
@@ -84,6 +111,16 @@ long double test1l(long double x)
return rintl(x);
}
+long int test11l(long double x)
+{
+ return lrintl(x);
+}
+
+long long int test12l(long double x)
+{
+ return llrintl(x);
+}
+
long double test2l(long double x)
{
return floorl(x);