Am 24.11.24 um 17:40 schrieb Paul Richard Thomas:
Fixed as 'obvious' on 13-branch to mainline with commit
r15-5629-g470ebd31843db58fc503ccef38b82d0da93c65e4

An error with PR number in the mainline ChangeLogs will be corrected
tomorrow.

     Fortran: Fix segfault in allocation of unlimited poly array [PR84869]

     2024-11-24  Paul Thomas  <pa...@gcc.gnu.org>

     gcc/fortran/ChangeLog

             PR fortran/84869
             * trans-expr.cc (trans_class_vptr_len_assignment): To access
             the '_len' field, 're' must be unlimited polymorphic.

     gcc/testsuite/
             PR fortran/84869
             * gfortran.dg/pr84869.f90: Comment out test of component refs.


This part of the patch is not obvious:

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 7013dd3a411..bc1d5a87307 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.  If not see

 /* trans-expr.cc-- generate GENERIC trees for gfc_expr.  */

+#define INCLUDE_MEMORY
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"


Forgotten to rebase?

Reply via email to