[Bug fortran/61780] [4.8/4.9/4.10 Regression] Wrong code when shifting elements of a multidimensional array

paul.richard.thomas at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Jul 12 15:18:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61780

--- Comment #3 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
Dear Mikael,

I didn't see your posting, which was about an hour before mine.  At
least we came to the same conclusion!

Thanks

Paul

On 12 July 2014 13:43, mikael at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61780
>
> Mikael Morin <mikael at gcc dot gnu.org> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |mikael at gcc dot gnu.org
>
> --- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> ---
> This sets loop reversal in dependency.c:
>           /* Set reverse if backward dependence and not inhibited.  */
>           if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
>             reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
>                      GFC_REVERSE_SET : reverse[n];
>
> However, the 'n' used indexes over array ref dimension, so in the case at hand
> the second element is flagged as GFC_REVERSE_SET.
> But the 'reverse' array is used later on using scalarizer dimensions, and as
> y(k,4:n) and y(k,3:n-1) are one-dimension arrays, only the first element of
> 'reverse' is ever looked at.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.



More information about the Gcc-bugs mailing list