https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98458
--- Comment #5 from xiao....@compiler-dev.com <xiao....@compiler-dev.com> --- (In reply to Paul Thomas from comment #4) > Created attachment 49856 [details] > Fix for the PR > > Thank you for the report on this problem. > > The attached patch fixes the problem and regression tests OK. I need to do a > bit more thinking about it because I was unable to find a point in general > expression simplification where the fix could be applied. Instead, it only > seems to work in the simplification of intrinsic functions. Fortunately, > this seems to be the only place where it is needed. > > Paul As a beginner of FORTRAN, I am not sure about the result of implied do-loop which contains array section, so add "print" to check. Thanks for your attention on this problem.