From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-18.smtpout.orange.fr [80.12.242.18]) by sourceware.org (Postfix) with ESMTPS id 1EC1B385AC32 for ; Wed, 2 Nov 2022 17:20:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1EC1B385AC32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([83.197.245.49]) by smtp.orange.fr with ESMTPA id qHPIokJp7XaJmqHPNoctDp; Wed, 02 Nov 2022 18:20:11 +0100 X-ME-Helo: [192.168.1.17] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Wed, 02 Nov 2022 18:20:11 +0100 X-ME-IP: 83.197.245.49 Message-ID: Date: Wed, 2 Nov 2022 18:20:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH, v2] Fortran: ordering of hidden procedure arguments [PR107441] To: Harald Anlauf , fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org References: <7d8ddf07-e66d-2678-de99-0e575c70ea17@orange.fr> <327319ac-4ef9-1e48-e993-57113d802d3b@orange.fr> <85a5951a-7ea4-57b3-895a-ff7dbf1ef92e@orange.fr> <93a5f029-4411-3424-f6ee-3b2bcf210050@gmx.de> Content-Language: fr, en-US From: Mikael Morin In-Reply-To: <93a5f029-4411-3424-f6ee-3b2bcf210050@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Le 31/10/2022 à 21:29, Harald Anlauf via Fortran a écrit : > Hi Mikael, > > thanks a lot, your testcases broke my initial (and incorrect) patch > in multiple ways.  I understand now that the right solution is much > simpler and smaller. > > I've added your testcases, see attached, with a simple scan of the > dump for the generated order of hidden arguments in the function decl > for the last testcase. > > Regtested again on x86_64-pc-linux-gnu.  OK now? > Unfortunately no, the coarray case works, but the other problem remains. The type problem is not visible in the definition of S, it is in the declaration of S's prototype in P. S is defined as: void s (character(kind=1)[1:_c] & restrict c, integer(kind=4) o, logical(kind=1) _o, integer(kind=8) _c) { ... } but P has: void p () { static void s (character(kind=1)[1:] & restrict, integer(kind=4), integer(kind=8), logical(kind=1)); void (*) (character(kind=1)[1:] & restrict, integer(kind=4), integer(kind=8), logical(kind=1)) pp; pp = s; ... }