https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109948
--- Comment #3 from anlauf at gcc dot gnu.org --- (In reply to Rimvydas (RJ) from comment #1) > More trivial testcase resulting in similar ICE. Yep, even smaller: subroutine foo(k_2d) implicit none integer :: k_2d(:) integer :: i associate(k=>k_2d) i = k(1) if (any(k==1)) i = 1 end associate end subroutine foo The associate is apparently one of the common components that is needed.