* [PATCH] Add tests for the builtin INF and nan() functions.
@ 2015-04-08 21:48 Michael Stefaniuc
0 siblings, 0 replies; only message in thread
From: Michael Stefaniuc @ 2015-04-08 21:48 UTC (permalink / raw)
To: linux-sparse
Test file cross checked with
gcc -c -Wall -Werror -Wno-unused-variable validation/builtin_inf.c
Signed-off-by: Michael Stefaniuc <mstefani@redhat.com>
---
Sorry for the delay.
validation/builtin_inf.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 validation/builtin_inf.c
diff --git a/validation/builtin_inf.c b/validation/builtin_inf.c
new file mode 100644
index 0000000..48546e4
--- /dev/null
+++ b/validation/builtin_inf.c
@@ -0,0 +1,13 @@
+static double d = __builtin_huge_val();
+static float f = __builtin_huge_valf();
+static long double l = __builtin_huge_vall();
+static double di = __builtin_inf();
+static float fi = __builtin_inff();
+static long double li = __builtin_infl();
+static double dn = __builtin_nan("");
+static float fn = __builtin_nanf("");
+static long double ln = __builtin_nanl("");
+
+/*
+ * check-name: __builtin INFINITY / nan()
+ */
--
2.1.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-08 21:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 21:48 [PATCH] Add tests for the builtin INF and nan() functions Michael Stefaniuc
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.