[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function

pault at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 24 13:56:00 GMT 2018


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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
Hi Andrew,

The testcase gives the same result if 'n' in the main program is a pointer.
However, if the dummy is given the allocatable/pointer attribute, as
appropriate, then the correct result is obtained.

Otherwise, using select type works correctly too.

Please use either of these as a temporary workaround.

I am hunting for where the dummy attribute has been missed in testing for the
need for pointer arithmetic in accessing the array elements.

Thanks for reporting this.

Paul


More information about the Gcc-bugs mailing list