https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115401
Bug ID: 115401 Summary: valgrind error in gfc_class_len_get Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Created attachment 58387 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58387&action=edit f90 source code >From the flang testsuite, file ./Lower/derived-type-finalization.f90 does this with recent flang built with valgrind: test $ /home/dcb40b/gcc/results.20240608.valgrind/bin/gfortran -c -w ./Lower/derived-type-finalization.f90 ==122289== Invalid read of size 8 ==122289== at 0x85EFD7: gfc_class_len_get(tree_node*) (trans-expr.cc:273) ==122289== by 0x87761D: trans_class_vptr_len_assignment(stmtblock_t*, gfc_expr*, gfc_expr*, gfc_se*, tree_node**, tree_node**, tree_node**) (trans-expr.cc:10170) ==122289== by 0x87A8B2: trans_class_assignment (trans-expr.cc:12006) ==122289== by 0x87A8B2: gfc_trans_assignment_1(gfc_expr*, gfc_expr*, bool, bool, bool, bool) (trans-expr.cc:12501) flang testsuite is at https://github.com/llvm/llvm-project/tree/main/flang/test/ Source code attached.