From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 098EB3858D33; Wed, 9 Nov 2022 19:56:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 098EB3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668023777; bh=qhuYAzKUerDXncD28mOZ0xyVLtXpr0mz48e6Ez3Cb/s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mTzrV9QfW4Hb819bK/d/aD+7ocWSyuxthth25D1VMm6AWZSw36Ge3dPrKjXRPXqmA 7GV4y+UpkardaEsQXyOv0GSWbRCnetgFgradGh7usmFBpYU6YKDOywWgiGZ+R1RdC3 IWKr/IgSlNfqtawtANJbyiHkxDHG7K2aHavVdSd0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107441] optional arguments are identified as "present" when missing Date: Wed, 09 Nov 2022 19:56:16 +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: 12.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: anlauf 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107441 --- Comment #11 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:e805adaa283129604a1fb305d0a1cf1e8a90c76e commit r13-3863-ge805adaa283129604a1fb305d0a1cf1e8a90c76e Author: Harald Anlauf Date: Fri Oct 28 21:58:08 2022 +0200 Fortran: ordering of hidden procedure arguments [PR107441] The gfortran ABI specifies the order of given and hidden procedure arguments, where the hidden presence status flags of optional+value scalar argumen= ts shall come before character length, coarray token and offset. Respect that. gcc/fortran/ChangeLog: PR fortran/107441 * trans-decl.cc (create_function_arglist): Adjust the ordering = of automatically generated hidden procedure arguments to match the documented ABI for gfortran. * trans-types.cc (gfc_get_function_type): Separate hidden parameters so that the presence flag for optional+value arguments come bef= ore string length, coarray token and offset, as required. gcc/testsuite/ChangeLog: PR fortran/107441 * gfortran.dg/coarray/pr107441-caf.f90: New test. * gfortran.dg/optional_absent_6.f90: New test. * gfortran.dg/optional_absent_7.f90: New test.=