From patchwork Sat Mar 9 20:57:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 1053871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-497624-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=netcologne.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="avVqNDcO"; dkim=pass (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="Xi/elcUj"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44GxXf61nNz9sBr for ; Sun, 10 Mar 2019 07:58:08 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=EET0MlH+7g+eXJNqBmgyAYA6As6wLPQEa27J7LQNZUATpCYyxS 6TkV7qeKrpg8PD3pkzur8G+zWfCJlMVM2aQT+fj/9RCPZgNCH5hY9NWv6YI1pcZb ewU4KSr2g9Wu6UCAYJPRUrrtYMfvZjgzUQgoIQK6p+FGf1mpfKDQt30OE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=QNyzfVpF6pgHViL3P2HFewGHYUw=; b=avVqNDcOctfcxWRm5JzZ 5nkSe+IDMrt2vB3x+HJgKX1G+DXqqG8TytWP8vIsI4rjcx79p4w7b1tvXexUtegT 9IoWJ4IqS82QcD9a8WM+5uNX3L32jHn5WOc28pRDkYzvHfL2rEGo4YmDvhGpfjfU TsGCqoTUENdaQVPqmfkpvJo= Received: (qmail 37870 invoked by alias); 9 Mar 2019 20:58:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 37849 invoked by uid 89); 9 Mar 2019 20:58:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=87734, vstring_length, m_vstring, char_string X-HELO: cc-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 09 Mar 2019 20:57:58 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 7C6D013457; Sat, 9 Mar 2019 21:57:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1552165075; bh=5mR/U8urxpmrkRnPmQBnmCosOzwXWhttrPTMuf6xzsw=; h=To:From:Subject:Message-ID:Date:From; b=Xi/elcUjVdQ3ILDDX0nyIZMHcfxiYCvWDYccF3eGilbfDidIItT8QUDRgAFY6TG4J fQI1tie1atEmQ+MBxk2Q0K+CoX86ydQLcJQli4nHS4RhRwIVgORzly5/bYpHr2Ho17 3wFFCYXZd2LOr56OB7L0NrhK0042IxS6+ZKdiVsYV5ZeQ+f4JOlPHofo/EwMMgzMlA VFYfVo3ZzZQFmf/YP2LkkLPDYmCzQWmbIn/8Uuj/Ey9fls5AwVWeCrJBcu336cVtGU tSUm9lHOTP+BMLYKVTojhA8g5EHWUXp9JZaPvCHH2exaxjWDRreRWsqoZhRB6kIbj2 rkBnYRFwRRosA== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 795D811D82; Sat, 9 Mar 2019 21:57:55 +0100 (CET) Received: from [2001:4dd7:fd2:0:7285:c2ff:fe6c:992d] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5c8428d3-5f8a-7f0000012729-7f00000190b8-1 for ; Sat, 09 Mar 2019 21:57:55 +0100 Received: from [IPv6:2001:4dd7:fd2:0:7285:c2ff:fe6c:992d] (2001-4dd7-fd2-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd7:fd2:0:7285:c2ff:fe6c:992d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Sat, 9 Mar 2019 21:57:52 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran] Fix PR 87734, rejects-valid Message-ID: <40221048-5730-74bf-5301-738fff8d8373@netcologne.de> Date: Sat, 9 Mar 2019 21:57:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 Hello world, a recent patch by Steve for PR 88376 fixed an ICE in the test case for PR 87734, leading further down the path to a rejects-valid bug in the same test case. Such is progress :-) This patch fixes that particular error by not treating module procedures which have been declared PUBLIC or PRIVATE as simple external procedures. This is a 7/8/9 regression, backporting may also include backporting Steve's patch for PR 88376 (I haven't checked yet). OK for trunk and the other open branches? Regards Thomas 2019-03-09 Thomas Koenig PR fortran/87734 * symbol.c (gfc_add_procedure): Only throw an error if the procedure has not been declared either PUBLIC or PRIVATE. 2019-03-09 Thomas Koenig PR fortran/87734 * gfortran.dg/public_private_module_10.f90: New test. Index: symbol.c =================================================================== --- symbol.c (Revision 269524) +++ symbol.c (Arbeitskopie) @@ -1805,7 +1805,8 @@ gfc_add_procedure (symbol_attribute *attr, procedu if (where == NULL) where = &gfc_current_locus; - if (attr->proc != PROC_UNKNOWN && !attr->module_procedure) + if (attr->proc != PROC_UNKNOWN && !attr->module_procedure + && attr->access == ACCESS_UNKNOWN) { if (attr->proc == PROC_ST_FUNCTION && t == PROC_INTERNAL && !gfc_notification_std (GFC_STD_F2008))