[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 changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Paul Thomas --- It helps to mark it as RESOLVED! Paul
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 --- Comment #8 from Paul Thomas --- Fixed on trunk. Thanks for the report. Paul
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 --- Comment #7 from Paul Thomas --- Author: pault Date: Thu Mar 1 08:56:31 2018 New Revision: 258097 URL: https://gcc.gnu.org/viewcvs?rev=258097=gcc=rev Log: 2018-03-01 Paul ThomasPR fortran/84538 * class.c (class_array_ref_detected): Remove the condition that there be no reference after the array reference. (find_intrinsic_vtab): Remove excess whitespace. * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp' as 'base and call build_class_array_ref earlier. 2018-03-01 Paul Thomas PR fortran/84538 * gfortran.dg/class_array_23.f03: New test. Added: trunk/gcc/testsuite/gfortran.dg/class_array_23.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/class.c trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 rsandifo at gcc dot gnu.org changed: What|Removed |Added CC||rsandifo at gcc dot gnu.org --- Comment #6 from rsandifo at gcc dot gnu.org --- Sorry about comment 5. Have fixed the changelog and renamed the test.
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 --- Comment #5 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Thu Mar 1 08:22:06 2018 New Revision: 258094 URL: https://gcc.gnu.org/viewcvs?rev=258094=gcc=rev Log: Tighten use of HARD_FRAME_POINTER_REGNUM in alias.c (PR 84538) RTL code needs to be consistent about whether it uses the stack pointer, the frame pointer or the argument pointer to access a given part of the frame. alias.c used this to divide accesses into three independent areas. The problem in the PR is that we did this for HARD_FRAME_POINTER_REGNUM even when the register wasn't being used as a frame pointer. We can't do that because the frame pointer is then just any old allocatable register and could certainly point to info accessed through the argument pointer or stack pointer. 2018-03-01 Richard Sandifordgcc/ PR rtl-optimization/84538 * alias.c (init_alias_target): Add commentary. (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM a unique base value if the frame pointer is not eliminated to the stack pointer. gcc/testsuite/ PR rtl-optimization/84538 * gcc.dg/torture/pr84538.c: New test. Added: trunk/gcc/testsuite/gcc.dg/torture/pr84538.c Modified: trunk/gcc/ChangeLog trunk/gcc/alias.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 Jakub Jelinek changed: What|Removed |Added Priority|P3 |P4 CC||jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- This changed behavior with r251949.
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 --- Comment #3 from Andrew Benson --- Hi Paul, Thanks for the select type workaround suggestion - I'll do that for now.
[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 changed: What|Removed |Added CC||pault at gcc dot gnu.org --- Comment #2 from Paul Thomas --- 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
[Bug fortran/84538] [8 Regression] Array of derived type elements incorrectly accessed in function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84538 Thomas Koenig changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-02-24 CC||tkoenig at gcc dot gnu.org Target Milestone|--- |8.0 Summary|Array of derived type |[8 Regression] Array of |elements incorrectly|derived type elements |accessed in function|incorrectly accessed in ||function Ever confirmed|0 |1 --- Comment #1 from Thomas Koenig --- 7.3.1 works, trunk fails.