Message ID | yddob5ngn5b.fsf@lokon.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On Thu, 14 Nov 2013, Rainer Orth wrote: > The new gcc.dg/torture/float128* tests FAIL on Solaris 9/x86 which lacks > <fenv.h>. Fixed by the patch below, tested with the appropriate runtest > invocations on i386-pc-solaris2.9 and i386-pc-solaris2.11. > > Ok for mainline? fenv_exceptions isn't correct for fp-int-convert-float128-timode-3.c, which is about rounding modes, not exceptions. The changes to the other three files are OK. > Btw., the new fenv_exceptions effective-target keywords needs > documenting in sourcebuild.texi. Duplicating documentation for effective-target keywords in sourcebuild.texi seems to me to be a mistake like the documentation for specs in invoke.texi - in both cases, the manual should refer to the source code (making sure the comments are adequate documentation) rather than represent these things as being any sort of interface. It's a bit more reasonable in sourcebuild.texi, being internals documentation (part of the trouble with specs documentation is that it's in the user manual, despite not being meant to be a stable interface), but if it goes there it ought to be automatically extracted from the source code. Most effective-targets added this year don't appear to be in sourcebuild.texi. (That is, sourcebuild.texi should document general features such as dg-require-effective-target, just not the *particular values* that are valid effective-target keywords.)
"Joseph S. Myers" <joseph@codesourcery.com> writes: >> Btw., the new fenv_exceptions effective-target keywords needs >> documenting in sourcebuild.texi. > > Duplicating documentation for effective-target keywords in > sourcebuild.texi seems to me to be a mistake like the documentation for > specs in invoke.texi - in both cases, the manual should refer to the > source code (making sure the comments are adequate documentation) rather > than represent these things as being any sort of interface. It's a bit > more reasonable in sourcebuild.texi, being internals documentation (part > of the trouble with specs documentation is that it's in the user manual, > despite not being meant to be a stable interface), but if it goes there it > ought to be automatically extracted from the source code. Most > effective-targets added this year don't appear to be in sourcebuild.texi. I disagree: testcase developers shouldn't have to deal with DejaGnu implementation details like the check_effective_target_* functions, rather just be able to refer the documentation in the internals documentation. Besides, target-supports.exp order seems pretty random at times, again not really useful for users of that stuff. I'm not against extracting the comments from the source, but until we're there they should be all in sourcebuild.texi. It's a pity new effective-target keywords crept in undocumented lately; I've made a pass over the whole list some time ago, adding everything that was missing. Rainer
# HG changeset patch # Parent 82a2c2ec47398cc2ae1798c8952b6f56e7e8f3dc Require fenv_exceptions in gcc.dg/torture/float128* tests diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c --- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c +++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c @@ -1,6 +1,7 @@ /* Test for "invalid" exceptions from __float128 comparisons. */ /* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */ /* { dg-options "" } */ +/* { dg-require-effective-target fenv_exceptions } */ #include <fenv.h> #include <stdlib.h> diff --git a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c --- a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c +++ b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c @@ -1,6 +1,7 @@ /* Test for spurious underflow from __float128 division. */ /* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */ /* { dg-options "" } */ +/* { dg-require-effective-target fenv_exceptions } */ #include <fenv.h> #include <stdlib.h> diff --git a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c --- a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c +++ b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c @@ -1,6 +1,7 @@ /* Test extensions to __float128 quiet signaling NaNs. */ /* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */ /* { dg-options "-fsignaling-nans" } */ +/* { dg-require-effective-target fenv_exceptions } */ #include <fenv.h> #include <float.h> diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c --- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c +++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c @@ -2,6 +2,7 @@ __float128. */ /* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */ /* { dg-require-effective-target int128 } */ +/* { dg-require-effective-target fenv_exceptions } */ /* { dg-options "-frounding-math" } */ #include <fenv.h>