All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Stefaniuc <mstefani@redhat.com>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] Add tests for the builtin INF and nan() functions.
Date: Wed, 8 Apr 2015 23:48:39 +0200	[thread overview]
Message-ID: <20150408214839.GA24502@redhat.com> (raw)

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

                 reply	other threads:[~2015-04-08 21:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150408214839.GA24502@redhat.com \
    --to=mstefani@redhat.com \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.