This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: DBL_DENORM_MIN should never be 0
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Sep 2014 20:03:56 +0200 (CEST)
- Subject: Re: DBL_DENORM_MIN should never be 0
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1409101124130 dot 29968 at stedding dot saclay dot inria dot fr> <Pine dot LNX dot 4 dot 64 dot 1409101640140 dot 12853 at digraph dot polyomino dot org dot uk> <alpine dot DEB dot 2 dot 11 dot 1409102021290 dot 1557 at laptop-mg dot saclay dot inria dot fr> <Pine dot LNX dot 4 dot 64 dot 1409111649410 dot 17850 at digraph dot polyomino dot org dot uk>
On Thu, 11 Sep 2014, Joseph S. Myers wrote:
On Thu, 11 Sep 2014, Marc Glisse wrote:
I don't know what kind of test you have in mind, so I added a runtime test. I
am just guessing that it probably fails on alpha because of PR 58757, I can't
test. Computing d+d may be even more likely to trigger potential issues, if
that's the goal.
Yes, a runtime test. I don't think there should be an xfail without it
actually having been tested to fail (and then such an xfail should come
with a comment referencing the bug filed in Bugzilla).
Would it be ok with the attached testcase then? (same ChangeLog).
--
Marc Glisse
/* { dg-do run } */
/* { dg-options "-std=c11" } */
/* Test that the smallest positive value is not 0. This needs to be true
even when denormals are not supported, so we do not pass any flag
like -mieee. If it fails on alpha, see PR 58757. */
#include <float.h>
int main(){
volatile float f = FLT_TRUE_MIN;
volatile double d = DBL_TRUE_MIN;
volatile long double l = LDBL_TRUE_MIN;
if (f == 0 || d == 0 || l == 0)
__builtin_abort ();
return 0;
}