This is the mail archive of the gcc-bugs@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]

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


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

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