https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67171
--- Comment #4 from Andre Vehreschild <vehre at gmx dot de> --- Hi Paul, please compare: https://gcc.gnu.org/ml/fortran/2015-10/msg00033.html to your fix. Sounds like we are doing the same. - Andre On Tue, 20 Oct 2015 14:13:55 +0000 "pault at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67171 > > Paul Thomas <pault at gcc dot gnu.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Assignee|unassigned at gcc dot gnu.org |pault at gcc dot > gnu.org > > --- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> --- > The bug arises because array sections are marked as DECL_ARTIFICIAL and so the > offending SOURCE expression produces a temporary variable, whose offset is out > of kilter, being zero. The most economical solution, in terms of effort, is > simply to suppress the creation of the temporary, when the source is a > variable. This is regtesting right now. Alternatively, the array descriptor > could be converted to unity based indexes, with the appropriate offset. > > I'll take it. > > Paul >