This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New option to support asymmetric integer ranges in gfortran
- From: Scott Robert Ladd <coyote at coyotegulch dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 26 Dec 2003 18:04:22 -0500
- Subject: Re: [PATCH] New option to support asymmetric integer ranges in gfortran
- References: <3FEC80D9.4010203@coyotegulch.com> <200312272159.24481.paul@codesourcery.com>
Paul Brook wrote:
<pedant>No blank lines between changeLog entries</pedant>
Either your mailer or mine seems to have mangled the whitespace in the patch
sufficiently that it won't apply. Other than that the contents of the patch
look ok.
Do you want me to make a new patch including the changes discussed
below, or should I send you the existing patch as an attachment?
However it does raise a couple of related latent bugs, which I think should be
fixed while we're working in this area.
Ah, yes, the butterfly affect...
* The code for MIN and MAX (& poss. others) intrinsics in trans-intrinsics.c
assumes that largest representable values are +-huge(). They should use
min_int and max_int. I think the library functions in libgfortran are ok.
* gfc_simplify_not is borken, and only works by chance most of the time.
Consider (not(huge(i) - 1) > 0)
* max_int is set to the largest unsigned integer, not the largest
representable value. Fixing this also requires fixing gfc_simplift_not, as
mentioned above.
I'll take a look at these over the weekend.
P.S. In case you hadn't found them, -fdump-parse-tree and -fdump-tree-original
are usedful when debugging this stuff.
Thanks for the pointer.
..Scott
--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing