]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix gimplification error for pointer remapping in forall [PR107143]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Wed, 5 Mar 2025 14:18:48 +0000 (15:18 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Mon, 10 Mar 2025 12:21:10 +0000 (13:21 +0100)
commitf2339cefd6985e20014f9b0795fb651a96788246
tree267da8999f974709ba7f334f19b09a9487f80345
parent21109b37e8585a7a1b27650fcbf1749380016108
Fortran: Fix gimplification error for pointer remapping in forall [PR107143]

Enhance dependency checking for data pointers to check for same derived
type and not only for a type being a derived type.  This prevent
generation of a descriptor for a function call, that is unsuitable in
forall's pointer assignment.

PR fortran/107143

gcc/fortran/ChangeLog:

* dependency.cc (check_data_pointer_types): Do not just compare
for derived type, but for same derived type.

gcc/testsuite/ChangeLog:

* gfortran.dg/forall_20.f90: New test.
gcc/fortran/dependency.cc
gcc/testsuite/gfortran.dg/forall_20.f90 [new file with mode: 0644]