From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout3.netcologne.de (cc-smtpout3.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:3]) by sourceware.org (Postfix) with ESMTPS id 0FCE93858D1E; Sun, 19 Mar 2023 07:34:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0FCE93858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=netcologne.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=netcologne.de Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 5A3F512380; Sun, 19 Mar 2023 08:34:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1679211279; bh=BsHSPGdUnvbubAPKKMByNcBVaR2WDYEsTG6O2inUM+s=; h=Message-ID:Date:Subject:To:References:From:In-Reply-To:From; b=M1QsTsqFaI83KU23lEKWixTPBphQHjQSZYnYY1JjwrJjj/6KsiEHQJiX7URQkIfiZ ti691mVrzudQaPD0dttx/qVK//cak17AIHcj2Nb3fC/iAEcZlFWhmHVWg3Xzaxx/ud XTUt+dz3MIyjzqUSnMCSpoULeMRZcX3i3nNLcBXtv60TV4Sh68zp95iyC8OWTZm1Nk N22nzbKoGqLdMWzisMhUK2s71eKudT97zhNrdtTQXjs3Riz957tnJExGQCTF5TDCT1 muT45GUGWi8B4rDZ5SY5/6i+BdHtJgeqW/QTWAcT70IAjaM0tOYnJTMdVcPsUlNfSK 1bzkRYt3rQnCQ== Received: from [IPV6:2001:4dd6:4ac:0:7285:c2ff:fe6c:992d] (2001-4dd6-4ac-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd6:4ac:0:7285:c2ff:fe6c:992d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA id B541111DE5; Sun, 19 Mar 2023 08:34:36 +0100 (CET) Message-ID: <56697d6e-7fe1-cb94-125e-7f9828be5d15@netcologne.de> Date: Sun, 19 Mar 2023 08:34:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877] To: Harald Anlauf , fortran , gcc-patches References: <3496724e-5ebd-d133-c6f6-807068b175f4@netcologne.de> Content-Language: en-US From: Thomas Koenig In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-NetCologne-Spam: L X-Spamd-Bar: - X-Rspamd-Action: no action X-Rspamd-Queue-Id: B541111DE5 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Harald, > Am 18.03.23 um 19:52 schrieb Thomas Koenig via Gcc-patches: >> Hi Harald, >> >>> the Fortran standard requires an explicit procedure interface in certain >>> situations, such as when they have a BIND(C) attribute (F2018:15.4.2.2). >>> The attached patch adds a check for this. >>> >>> Regtested on x86_64-pc-linux-gnu.  OK for mainline? >> >> While this fixes the ICE, it misses >> >> function f() bind(c) >>    f = 42. >> end >> >> subroutine p >>    bind(c) f     ! { dg-error "must be explicit" } >>    x = f() >> end > > what do you mean by "it misses"? Sorry, that was caused by confusion on my part (and it is better to test an assumption of what the compiler actually does :-) Patch is OK, also for backport. Maybe you can also include the test above, just to make sure. Best regards Thomas