public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: i386 XFmode testcase
@ 1998-02-15 20:00 Jeffrey A Law
  1998-02-16 14:21 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey A Law @ 1998-02-15 20:00 UTC (permalink / raw)
  To: hjl; +Cc: egcs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: i386 XFmode testcase
  1998-02-15 20:00 i386 XFmode testcase Jeffrey A Law
@ 1998-02-16 14:21 ` H.J. Lu
  1998-02-17 21:50   ` Jeffrey A Law
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 1998-02-16 14:21 UTC (permalink / raw)
  To: law; +Cc: egcs

> 
> 
> 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;
+}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: i386 XFmode testcase
  1998-02-16 14:21 ` H.J. Lu
@ 1998-02-17 21:50   ` Jeffrey A Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1998-02-17 21:50 UTC (permalink / raw)
  To: H.J. Lu; +Cc: egcs

  In message < m0y4WKc-00058fC@ocean.lucon.org >you write:
  > 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.
Thanks.  Installed.
jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-02-17 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-15 20:00 i386 XFmode testcase Jeffrey A Law
1998-02-16 14:21 ` H.J. Lu
1998-02-17 21:50   ` Jeffrey A Law

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).