[PATCH] Improve Fortran non-constant step DO translation (PR fortran/37536)
Tobias Burnus
burnus@net-b.de
Wed Sep 17 21:54:00 GMT 2008
Jakub Jelinek wrote:
> Bootstrapped/regtested on x86_64-linux, on the given testcase
> smaller code is generated on x86_64-linux at least.
> In the PR Luis said the patch improved slightly swim on ppc32
> and art on ppc64.
>
> Ok for trunk?
+ countm1 = to - from / step;
+ }
+ else
+ {
+ if (to > from) goto exit_label;
+ countm1 = from - to / -step;
I believe there are parentheses missing around "from-to" in
this comment; the code looks OK and the old comment was
also:
- /* tmp = abs(to - from) / abs(step) */
Otherwise it looks OK. Thanks for the fix - and thanks to
Andrew for finding the problem and to Luis for testing.
Tobias
More information about the Gcc-patches
mailing list