]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix ICE in verify_gimple_in_seq with substrings [PR120743]
authorHarald Anlauf <anlauf@gmx.de>
Tue, 24 Jun 2025 18:46:38 +0000 (20:46 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 24 Jun 2025 18:46:38 +0000 (20:46 +0200)
commit5bc92717b804483a17dd5095f8b6d4fd75a472b1
tree4cb3d859c365b511421ebbb7786166fc66be03ce
parented7fc2b29ead88be30b40ec2c3c51495200b08c4
Fortran: fix ICE in verify_gimple_in_seq with substrings [PR120743]

PR fortran/120743

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_substring): Substring indices are of
type gfc_charlen_type_node.  Convert to size_type_node for
pointer arithmetic only after offset adjustments have been made.

gcc/testsuite/ChangeLog:

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

Co-authored-by: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Co-authored-by: Mikael Morin <mikael@gcc.gnu.org>
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/pr120743.f90 [new file with mode: 0644]