public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] don't use IBM 128-bit long double for IEEE tests
@ 2008-08-25 23:16 Janis Johnson
  2008-08-28 18:53 ` Joseph S. Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Janis Johnson @ 2008-08-25 23:16 UTC (permalink / raw)
  To: gcc-patches

This patch modifies two tests of type generic functions that assume IEEE
arithmetic for all types.  IBM 128-bit long double is not IEEE, so
use 64-bit long double instead.  Tested on powerpc64-unknown-linux-gnu
with -m32/-m64 on a system where long double defaults to 128 bits and
one on which it defaults to 64 bits.  I'll check this in soon if there
are no objections.

2008-08-25  Janis Johnson  <janis187@us.ibm.com>

	gcc.dg/torture/type-generic-1.c: Don't use IBM 128-bit long double.
	g++.dg/torture/type-generic-1.C: Ditto.

Index: gcc/testsuite/gcc.dg/torture/type-generic-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/type-generic-1.c	(revision 139344)
+++ gcc/testsuite/gcc.dg/torture/type-generic-1.c	(working copy)
@@ -3,6 +3,8 @@
 
 /* { dg-do run } */
 /* { dg-options "-mieee" { target sh*-*-* } } */
+/* IBM 128-bit long double is not IEEE, don't use it for this test.  */
+/* { dg-options "-mlong-double-64" { target powerpc*-*-linux* } } */
 /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
 
 #include "../tg-tests.h"
Index: gcc/testsuite/g++.dg/torture/type-generic-1.C
===================================================================
--- gcc/testsuite/g++.dg/torture/type-generic-1.C	(revision 139344)
+++ gcc/testsuite/g++.dg/torture/type-generic-1.C	(working copy)
@@ -3,6 +3,8 @@
 
 /* { dg-do run } */
 /* { dg-options "-mieee" { target sh*-*-* } } */
+/* IBM 128-bit long double is not IEEE, don't use it for this test.  */
+/* { dg-options "-mlong-double-64" { target powerpc*-*-linux* } } */
 /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
 
 #include "../../gcc.dg/tg-tests.h"


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

* Re: [testsuite] don't use IBM 128-bit long double for IEEE tests
  2008-08-25 23:16 [testsuite] don't use IBM 128-bit long double for IEEE tests Janis Johnson
@ 2008-08-28 18:53 ` Joseph S. Myers
  2008-08-28 23:55   ` Janis Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2008-08-28 18:53 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc-patches

On Mon, 25 Aug 2008, Janis Johnson wrote:

> This patch modifies two tests of type generic functions that assume IEEE
> arithmetic for all types.  IBM 128-bit long double is not IEEE, so
> use 64-bit long double instead.  Tested on powerpc64-unknown-linux-gnu
> with -m32/-m64 on a system where long double defaults to 128 bits and
> one on which it defaults to 64 bits.  I'll check this in soon if there
> are no objections.

I do not see anything in these tests that assumes IEEE arithmetic.  They 
test properties of NaNs and infinities - but IBM long double has those.  
They test properties of particular constants - but I see nothing about 
those properties that would be incorrect for IBM long double.  They do not 
test that the results of arithmetic have particular values to within a 
given number of ULPs, or the handling of particular rounding modes, or 
floating-point exceptions, which are what would not work for IBM long 
double.

Which specific assertions do you find are unportable to IBM long double as 
opposed to indicating compiler bugs?  Your analysis in PR 36332 says the 
built-in functions are misclassifying __LDBL_MAX__, which would clearly be 
a compiler bug, not a testcase bug.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [testsuite] don't use IBM 128-bit long double for IEEE tests
  2008-08-28 18:53 ` Joseph S. Myers
@ 2008-08-28 23:55   ` Janis Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Janis Johnson @ 2008-08-28 23:55 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Wed, 2008-08-27 at 19:51 +0000, Joseph S. Myers wrote:
> Which specific assertions do you find are unportable to IBM long double as 
> opposed to indicating compiler bugs?  Your analysis in PR 36332 says the 
> built-in functions are misclassifying __LDBL_MAX__, which would clearly be 
> a compiler bug, not a testcase bug.

Mea culpa.  I got sloppy and didn't look into it far enough this time,
and obvious forgot I had looked into this failure once before.

Janis

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

end of thread, other threads:[~2008-08-27 23:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-25 23:16 [testsuite] don't use IBM 128-bit long double for IEEE tests Janis Johnson
2008-08-28 18:53 ` Joseph S. Myers
2008-08-28 23:55   ` Janis Johnson

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