]> gcc.gnu.org Git - gcc.git/commit
Fortran: fix issues with class(*) assignment [PR114827]
authorHarald Anlauf <anlauf@gmx.de>
Mon, 29 Apr 2024 17:52:52 +0000 (19:52 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 5 May 2024 18:34:15 +0000 (20:34 +0200)
commit21e7aa5f3ea44ca2fef8deb8788edffc04901b5c
tree38f968194bf8e4437a71641e59c296714120b5b8
parentaffd77d3fe7bfb525b3fb23316d164e847ed02d1
Fortran: fix issues with class(*) assignment [PR114827]

gcc/fortran/ChangeLog:

PR fortran/114827
* trans-array.cc (gfc_alloc_allocatable_for_assignment): Take into
account _len of unlimited polymorphic entities when calculating
the effective element size for allocation size and array span.
Set _len of lhs to _len of rhs.
* trans-expr.cc (trans_class_assignment): Take into account _len
of unlimited polymorphic entities for allocation size.

gcc/testsuite/ChangeLog:

PR fortran/114827
* gfortran.dg/asan/unlimited_polymorphic_34.f90: New test.
gcc/fortran/trans-array.cc
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/asan/unlimited_polymorphic_34.f90 [new file with mode: 0644]
This page took 0.065846 seconds and 5 git commands to generate.