From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F2F9E384A026; Wed, 30 Dec 2020 02:19:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2F9E384A026 From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98458] PRINT the array constructed from implied do-loop throw ICE Date: Wed, 30 Dec 2020 02:19:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 02:19:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98458 --- Comment #6 from Steve Kargl -= -- On Wed, Dec 30, 2020 at 12:52:03AM +0000, xiao.liu@compiler-dev.com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98458 >=20 > --- Comment #5 from xiao.liu@compiler-dev.com = --- > (In reply to Paul Thomas from comment #4) > > Created attachment 49856 [details] > > Fix for the PR > >=20 > > Thank you for the report on this problem. > >=20 > > 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 gene= ral > > expression simplification where the fix could be applied. Instead, it o= nly > > seems to work in the simplification of intrinsic functions. Fortunately, > > this seems to be the only place where it is needed. > >=20 > > Paul >=20 > As a beginner of FORTRAN, I am not sure about the result of implied do-lo= op > which contains array section, so add "print" to check. Thanks for your > attention on this problem. >=20 PRINT has nothing to do with the problem. I simply have no interest in fixing the changed and now misleading subject line. I've been asked to stop. My proposed patch fixes the issue in one spot. Paul's patch fixes potentially many spots. Unfortunately, the handling of implied do-loops is done in an ad hoc fashion, and is complicated by the potential problem of exhausting the stack.=