public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: law@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: i386 XFmode testcase
Date: Mon, 16 Feb 1998 14:21:00 -0000	[thread overview]
Message-ID: <m0y4WKc-00058fC@ocean.lucon.org> (raw)
In-Reply-To: <3316.887601706@hurl.cygnus.com>

> 
> 
> It occurs to me that that testcase could easily live in gcc.dg;
> its driver is more suited to handling tests for specific targets.
> 
> Can you rewrite the test within the gcc.dg framework (look at
> other .c files in gcc.dg for examples).
> 
> jeff
> 

Here it is.

Thanks.

-- 
H.J. Lu (hjl@gnu.org)
--
Mon Feb 16 11:17:27 1998  H.J. Lu  (hjl@gnu.org)

	* gcc.dg/980211-1.c: New to test long double on
	x86.

--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980211-1.c	Mon Feb 16 11:31:37 1998
@@ -0,0 +1,27 @@
+/* Test long double on x86. */
+
+/* { dg-do run { target i?86-*-* } } */
+/* { dg-options -O2 } */
+
+__inline int
+__signbitl (long double __x)
+{
+  union { long double __l; int __i[3]; } __u = { __l: __x };
+
+  return (__u.__i[2] & 0x8000) != 0;
+}
+
+void
+foo (long double x, long double y)
+{
+  long double z = x / y;
+  if (__signbitl (x) && __signbitl (z))
+    abort ();
+}
+
+int main()
+{
+  if (sizeof (long double) > sizeof (double))
+    foo (-0.0, -1.0);
+  return 0;
+}

  reply	other threads:[~1998-02-16 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-15 20:00 Jeffrey A Law
1998-02-16 14:21 ` H.J. Lu [this message]
1998-02-17 21:50   ` Jeffrey A Law

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=m0y4WKc-00058fC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).