Skip to contentSkip to conversation

Add tests for the builtin INF and nan() functions.

PATCH New Michael Stefaniuc 1 participant 1 message Apr 8, 2015 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add tests for the builtin INF and nan() functions.

Test file cross checked with
gcc -c -Wall -Werror -Wno-unused-variable validation/builtin_inf.c

---
Sorry for the delay.

 validation/builtin_inf.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 validation/builtin_inf.c
validation/builtin_inf.c new file +13 -0
new file mode 100644
index 0000000..48546e4
@@ -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()
+ */
Signature · 1 line
2.1.0