]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: FIx ICE in associate with elemental function [PR118750]
authorPaul Thomas <pault@gcc.gnu.org>
Thu, 6 Feb 2025 16:40:19 +0000 (16:40 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Thu, 6 Feb 2025 16:40:40 +0000 (16:40 +0000)
commita03303b4d5b2ca58e5750a4d5bd735d85a091273
tree83cb4fca99554440083289e1987e16b818e926b3
parentbb9cee8928f7f4dfb94e7a8f232eda736b711450
Fortran:  FIx ICE in associate with elemental function [PR118750]

2025-02-06  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/118750
* resolve.cc (resolve_assoc_var): If the target expression has
a rank, do not use gfc_expression_rank, since it will return 0
if the function is elemental. Resolution will have produced the
correct rank.

gcc/testsuite/
PR fortran/118750
* gfortran.dg/associate_72.f90: New test.
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/associate_72.f90 [new file with mode: 0644]