The master branch has been updated by Jerry DeLisle <[email protected]>:

https://gcc.gnu.org/g:8ed729d68d2b8f2207054915ae3dca15a5ff75c0

commit r17-6426-g8ed729d68d2b8f2207054915ae3dca15a5ff75c0


On 11/18/26 9:24 AM, Jerry D wrote:
Hello all,

See attached patch.

This was probably a latent bug uncovered by the commit r17-3342.

This is a one-liner fix.

I will commit this soon.

Regression tested on X86_64. Thanks to Harald and Mikael for help isolating 
this.

Best regards,

Jerry

---

fortran: [PR128691] ICE for vector subscript on CHARACTER TARGET dummy

gfc_conv_expr_descriptor describes a CHARACTER subreference array by a
new descriptor instead of copying it to a temporary, but that code cannot
describe a vector subscript and asserts.  Since r17-3342 every
assumed-shape CHARACTER TARGET dummy counts as a subreference array, so a
vector-subscripted section of one of rank two or more reached it; a
CHARACTER pointer to an array of components already could.  Make a
temporary for any expression with a vector subscript.

Assisted-by: Claude Opus 5.5

     PR fortran/128691

gcc/fortran/ChangeLog:

     * trans-array.cc (gfc_conv_expr_descriptor): Do not treat an
     expression with a vector subscript as a subreference array target.

gcc/testsuite/ChangeLog:

     * gfortran.dg/pr128691.f90: New test.
---

Reply via email to