From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 16FA13853D58; Fri, 25 Nov 2022 22:06:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16FA13853D58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669414014; bh=nCC/QX3nM4tsW9rfPvTJJG0lKCoriO+QkCoU/U4VH7U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Yu1gs92GSm0qogNKxIkFhhbY8fgQOc5tiKDCyvrZINj3q8b8ynAx2IZeY5gMGlm4q sORTX8YuvKb3Fgy3udSD803Sfe6PRe7SJ5KjH+IR/tzY4xkPcq+e74KQ5ZivVELg0d Rur7E58a2U5KJEmeydCp8JXI6DglSB5p0TX8pj94= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107819] ICE in gfc_check_argument_var_dependency, at fortran/dependency.cc:978 Date: Fri, 25 Nov 2022 22:06:52 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107819 --- Comment #10 from anlauf at gcc dot gnu.org --- Created attachment 53968 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53968&action=3Dedit Revised patch (In reply to Mikael Morin from comment #9) > It seems the semantics when an argument has the value attribute is the sa= me > as the case ELEM_CHECK_VARIABLE in my previous comment. > So forcing the value of the elemental argument to ELEM_CHECK_VARIABLE at > some appropriate place could possibly work. Many thanks for the explanations! Looking at the involved code, the most simple solution I came up with is attached. It scans over the actual arguments associated with the dummies, and when we find one with the VALUE attribute, we enforce the dependency check. It fixes the testcase and regtests fine. I was struggling with the actual generated code, which is rather a temporary for the arguments with INTENT(INOUT/OUT), but that should be functionally equivalent.=