From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D15AC3858417; Sun, 16 Jan 2022 21:20:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D15AC3858417 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/87711] ICE in gfc_trans_transfer, at fortran/trans-io.c:2676 Date: Sun, 16 Jan 2022 21:20:10 +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: 9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: 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: Sun, 16 Jan 2022 21:20:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87711 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Mikael Morin : https://gcc.gnu.org/g:e63ef9ae51ab67fdd280401e643eb97fddef8d93 commit r11-9467-ge63ef9ae51ab67fdd280401e643eb97fddef8d93 Author: Mikael Morin Date: Sun Jan 16 16:26:15 2022 +0100 Fortran: Fix KIND argument index for LEN_TRIM. The mainline code to check whether an argument has to be included in scalarization uses only the name of a dummy argument object to recogniz= e a specific argument of an intrinsic procedure. On the 11 branch, the dum= my argument object is not available and the code uses a mix of check for argument name (for keyword arguments) and argument index (for non-keywo= rd ones). This makes backports non-straightforward in this area, as the argument indexes depend on the intrinsics. This change fixes a bogus backport for LEN_TRIM, whose KIND argument in= dex should be different from that of INDEX. PR fortran/87711 PR fortran/97896 gcc/fortran/ChangeLog: * trans-array.c (arg_evaluated_for_scalarization): Handle keywo= rd and non-keyword arguments separatedly. Adapt the expected argument index for KIND to each intrinsic in the non-keyword case. gcc/testsuite/ChangeLog: * gfortran.dg/index_5.f90: Enrich test with usages of INDEX with a non-keyword KIND argument. * gfortran.dg/len_trim.f90: Same for LEN_TRIM. (tests cherry picked from commit 15630e6e9eb019477d1fc5c0966b43979e18ae= 18)=