[Bug fortran/114827] Valgrind reports errors with class(*) assignment
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 5 18:35:17 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114827
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:21e7aa5f3ea44ca2fef8deb8788edffc04901b5c
commit r15-168-g21e7aa5f3ea44ca2fef8deb8788edffc04901b5c
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Apr 29 19:52:52 2024 +0200
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.
More information about the Gcc-bugs
mailing list