This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New option to support asymmetric integer ranges in gfortran


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]