https://gcc.gnu.org/g:927d2a65a48f56eb87517a075b6d85ed86762116
commit 927d2a65a48f56eb87517a075b6d85ed86762116 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Fri May 30 19:40:58 2025 +0200 Correction régression associated_target_6 Diff: --- gcc/fortran/trans-types.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index 460189beaf76..a065b9748a55 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -3228,7 +3228,8 @@ gfc_get_derived_type (gfc_symbol * derived, int codimen) do_loop = false; for (c = derived->components, i = 0; c; c = c->next, i++) { - if (c->backend_decl) + if (fields.length () > i + && fields[i] != nullptr) continue; bool same_alloc_type = c->attr.allocatable