From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7538A3858038; Wed, 30 Dec 2020 13:40:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7538A3858038 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98458] ICE in gfc_conv_array_initializer due to array expressions within implied do-loop Date: Wed, 30 Dec 2020 13:40:22 +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: pault at gcc dot gnu.org 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: short_desc 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 13:40:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98458 Paul Thomas changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|PRINT the array constructed |ICE in |from implied do-loop throw |gfc_conv_array_initializer |ICE |due to array expressions | |within implied do-loop --- Comment #7 from Paul Thomas --- (In reply to Steve Kargl from comment #6) Hi Steve, I didn't check for any new postings when I attached my version of the patch. Apologies for treading on your toes.... again :-) > 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. Who asked you to stop? Anyway, I have added a slightly more informative sub= ject line. >=20 > 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. I like your use of gfc_reduce_init_expr since it also does a type check. No= te though that it resets gfc_reduce_init_expr and so it needs to be set once a= gain after the call. I had totally forgotten about the 'fatal' flag needing to be set in the cal= l to gfc_expand_constructor to avoid stack exhaustion. I had to rediscover it experimentally. A combined patch is being regtested now. Cheers Paul=