aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2024-03-27 21:18:04 +0100
committerHarald Anlauf <anlauf@gmx.de>2024-03-28 18:43:47 +0100
commitbbb7c513dddc5c9b2d5e9b78bc1c2f85a0cfe07e (patch)
tree0ea96455d06df5e9598a94b0245d407b53ed8491 /libiberty
parentc1424628dc95829408882f01cbf0dd61566dc312 (diff)
downloadgcc-bbb7c513dddc5c9b2d5e9b78bc1c2f85a0cfe07e.zip
gcc-bbb7c513dddc5c9b2d5e9b78bc1c2f85a0cfe07e.tar.gz
gcc-bbb7c513dddc5c9b2d5e9b78bc1c2f85a0cfe07e.tar.bz2
Fortran: fix DATA and derived types with pointer components [PR114474]
When matching actual arguments in match_actual_arg, these are initially treated as a possible dummy procedure, assuming that the correct type is determined later. This resolution could fail when the procedure is a derived type constructor with a pointer component and appears in a DATA statement, where the pointer shall be associated with an initial data target. Check for those cases where the type obviously has not been resolved yet, and which were missed because there was no component reference. gcc/fortran/ChangeLog: PR fortran/114474 * primary.cc (gfc_variable_attr): Catch variables used in structure constructors within DATA statements that are still tagged with a temporary type BT_PROCEDURE from match_actual_arg and which have the target attribute, and fix their typespec. gcc/testsuite/ChangeLog: PR fortran/114474 * gfortran.dg/data_pointer_3.f90: New test.
Diffstat (limited to 'libiberty')
0 files changed, 0 insertions, 0 deletions