This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Implement C _FloatN, _FloatNx types [version 5]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: James Greenhalgh <james dot greenhalgh at arm dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, <fortran at gcc dot gnu dot org>, <jason at redhat dot com>, <richard dot earnshaw at arm dot com>, <nickc at redhat dot com>, <ramana dot radhakrishnan at arm dot com>, <marcus dot shawcroft at arm dot com>, <dje dot gcc at gmail dot com>, <segher at kernel dot crashing dot org>, <meissner at linux dot vnet dot ibm dot com>, <murphyp at linux dot vnet dot ibm dot com>, <nd at arm dot com>
- Date: Wed, 17 Aug 2016 16:44:33 +0000
- Subject: Re: Implement C _FloatN, _FloatNx types [version 5]
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1606211202040.4526@digraph.polyomino.org.uk> <alpine.DEB.2.20.1606211738200.31330@digraph.polyomino.org.uk> <alpine.DEB.2.20.1606231418120.21240@digraph.polyomino.org.uk> <alpine.DEB.2.20.1606271720270.7438@digraph.polyomino.org.uk> <alpine.DEB.2.20.1607191347340.9265@digraph.polyomino.org.uk> <alpine.DEB.2.20.1607222158330.22448@digraph.polyomino.org.uk> <20160817154244.GA39270@arm.com>
On Wed, 17 Aug 2016, James Greenhalgh wrote:
> The obvious fix would be this modification to fp-int-convert.h:
>
> - TEST_I_F_VAL (U, F, (U)~(((U)~(U)0) >> 1), 1); \
> + TEST_I_F_VAL (U, F, (U)~(((U)~(U)0) >> 1), P_OK1 (P, U)); \
That's not logically correct, because this is an issue about exponent
range, not precision; it's fine to test this input value when converting
from TImode to float, for example, because it's 2**127 which is exactly
representable in float.
I'll do another revision of the patch that addresses this and has other
testsuite improvements (but no changes to the actual compiler changes,
which still need review for language-independent changes outside the
rs6000 back end).
--
Joseph S. Myers
joseph@codesourcery.com