https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128682
--- Comment #20 from Harald Anlauf <anlauf at gcc dot gnu.org> --- (In reply to Harald Anlauf from comment #19) > (In reply to Harald Anlauf from comment #18) > > Untested patch for the testcase in comment#17: > > This does not fix the following code added to this testcase: > > function my_reshape (arr, vec) result (res) > character(*), intent(in) :: arr(:) > integer, intent(in) :: vec(:) > character(len(arr)) :: res(vec(1),vec(2)) > res = reshape (arr, [vec(1),vec(2)]) > end function my_reshape > > subroutine my_show (arr) > character(*), intent(in) :: arr(:) > call show (transpose (my_reshape (arr, [w, h]))) ! ICE > end subroutine It ICEs if these procedures are in the above order, but it works fine if these two are interchanged. The tree dump looks very similar for both variants, only the character length setting is slightly weird in the failing case. But why? I am at a loss now...
