]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix passing array component ref to polymorphic procedures
authorPeter Hill <peter.hill@york.ac.uk>
Tue, 20 Feb 2024 19:42:53 +0000 (20:42 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 20 Feb 2024 19:50:01 +0000 (20:50 +0100)
commit14ba8d5b87acd5f91ab8b8c02165a0fd53dcc2f2
tree1cd6ed4471bac28787b4a5496001c984638140b1
parent81e5f276c59897077ffe38202849c93e9c580c41
Fortran: fix passing array component ref to polymorphic procedures

PR fortran/105658

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_intrinsic_to_class): When passing an
array component reference of intrinsic type to a procedure
with an unlimited polymorphic dummy argument, a temporary
should be created.

gcc/testsuite/ChangeLog:

* gfortran.dg/PR105658.f90: New test.

Signed-off-by: Peter Hill <peter.hill@york.ac.uk>
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/PR105658.f90 [new file with mode: 0644]