Committed fix for pr124208

Jerry D <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Thanks to Christopher.

Fairly simple fix.

Jerry

commit 97965bdc1ed36f97a6e2ec2ee7bc208dd05d8c18 (HEAD -> master, origin/master, 
origin/HEAD)
Author: Christopher Albert <[email protected]>
Date:   Mon Feb 23 22:42:44 2026 +0100

     fortran: Fix iterator counting in nested block scopes [PR fortran/124208]

     Count FORALL/DO CONCURRENT iterators in EXEC_BLOCK namespace code chains
     while sizing VAR_EXPR in gfc_resolve_forall.

     This prevents undersized allocation and an ICE for nested FORALL/DO
     CONCURRENT inside ASSOCIATE/BLOCK constructs.

             PR fortran/124208

     gcc/fortran/ChangeLog:

             * resolve.cc (gfc_max_forall_iterators_in_chain): Count
             iterators in EXEC_BLOCK namespaces.

     gcc/testsuite/ChangeLog:

             * gfortran.dg/pr124208.f90: New test.

     Signed-off-by: Christopher Albert <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.