https://gcc.gnu.org/g:bd9fd3b849a1b06c22b8cb34eeb23396a7c23f87

commit bd9fd3b849a1b06c22b8cb34eeb23396a7c23f87
Author: Mikael Morin <[email protected]>
Date:   Sun Sep 20 12:52:15 2026 +0200

    Correction partielle ICE class_allocate_25

Diff:
---
 gcc/fortran/array.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc
index 733ce5d27d05..27682dd3fbcb 100644
--- a/gcc/fortran/array.cc
+++ b/gcc/fortran/array.cc
@@ -1527,6 +1527,8 @@ check_element_type (gfc_expr *expr, bool convert)
        {
          cons_state = CONS_GOOD;
          constructor_ts = expr->ts;
+         if (constructor_ts.type == BT_CLASS)
+           constructor_ts.type = BT_DERIVED;
        }
 
       return 0;
@@ -1614,6 +1616,8 @@ gfc_check_constructor_type (gfc_expr *e)
     {
       cons_state = CONS_GOOD;
       constructor_ts = e->ts;
+      if (constructor_ts.type == BT_CLASS)
+       constructor_ts.type = BT_DERIVED;
     }
   else
     {

Reply via email to