From patchwork Tue Nov 10 14:41:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Dominique_d=27Humi=C3=A8res?= X-Patchwork-Id: 542393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3F16F14141A for ; Wed, 11 Nov 2015 01:41:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=I7Dro1Aw; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; q=dns; s=default; b=H4dB0RcTbRVLOCF4IyeK7wU kjfP0mYQ1smCnMe7Gb1AR+HRPL4kn+rAAANkw6qLYwuyyKUFLrKYhsZMlNloP9Te liwcpPLmpCDEgbH5RFesgv0FewraEjRNTL5intiX1f1H5TjopkZseNri3Gco5NOc Ul52vZLBWt1I/sLTQ3n4= 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:from :content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; s=default; bh=ch1HJ+mmM9PhO+JCboH7ITTHhys=; b= I7Dro1Aw52wAK6hcJs/tkLElxVp8UdDVFhELGB1IWHuAXvwfK8/L7gCl+Z6ahIFR cXssQDOpAOLHron29aHoty30lMV3ALCrdpXhDGjT0ICCp/fnBjDwnDOKHuhVLcAz L3I5+BbbFg7LjbN3xt9uHD2bzmqsKCvsAf0LjKfuYiY= Received: (qmail 121418 invoked by alias); 10 Nov 2015 14:41:29 -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 121398 invoked by uid 89); 10 Nov 2015 14:41:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SUBJ_ALL_CAPS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: nef2.ens.fr Received: from nef2.ens.fr (HELO nef2.ens.fr) (129.199.96.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Nov 2015 14:41:27 +0000 Received: from mailhost.lps.ens.fr (tournesol.lps.ens.fr [129.199.120.1]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id tAAEfMDC082025 ; Tue, 10 Nov 2015 15:41:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mailhost.lps.ens.fr (Postfix) with ESMTP id 57E1817D; Tue, 10 Nov 2015 15:41:22 +0100 (CET) Received: from mailhost.lps.ens.fr ([127.0.0.1]) by localhost (tournesol.lps.ens.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QYVgaX85ushr; Tue, 10 Nov 2015 15:41:22 +0100 (CET) Received: from [192.168.1.14] (log78-1-82-242-47-10.fbx.proxad.net [82.242.47.10]) by mailhost.lps.ens.fr (Postfix) with ESMTPSA id 2876917A; Tue, 10 Nov 2015 15:41:22 +0100 (CET) From: =?utf-8?Q?Dominique_d=27Humi=C3=A8res?= Subject: [PATCH] PR47266 Date: Tue, 10 Nov 2015 15:41:20 +0100 Message-Id: <5B9BD65F-3361-4E28-AC38-B91093CAA013@lps.ens.fr> Cc: gcc-patches To: gfortran Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) I’ld like to close PR47266 as FIXED after the commit on trunk and 5.2.1 of the following test extracted from https://gcc.gnu.org/ml/fortran/2011-01/msg00094.html. The test succeeds on trunk and 5.2.1 (see https://gcc.gnu.org/ml/gcc-testresults/2015-11/msg00965.html in which it was included). OK for trunk and 5.2.1? Dominique Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (revision 229793) +++ gcc/testsuite/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2015-11-10 Dominique d'Humieres + + PR fortran/47266 + * gfortran.dg/warn_unused_function_2.f90: Add a new test. + 2015-11-10 Ilya Enkovich * gcc.target/i386/mask-pack.c: New test. Index: gcc/testsuite/gfortran.dg/module_private_2.f90 =================================================================== --- gcc/testsuite/gfortran.dg/module_private_2.f90 (nonexistent) +++ gcc/testsuite/gfortran.dg/module_private_2.f90 (working copy) @@ -0,0 +1,34 @@ +! { dg-do compile } +! { dg-options "-O2 -fdump-tree-optimized" } +! +! PR fortran/47266 +! +! Check whether the private procedure "priv" is optimized away +! +module m + implicit none + private :: priv + private :: export1, export2 + public :: pub +contains + integer function priv() + priv = 44 + end function priv + integer function export1() + export1 = 45 + end function export1 + function export2() bind(C) ! { dg-warning "is marked PRIVATE" } + use iso_c_binding, only: c_int + integer(c_int) :: export2 + export2 = 46 + end function export2 + subroutine pub(a,b) + integer :: a + procedure(export1), pointer :: b + a = priv() + b => export1 + end subroutine pub +end module m +! { dg-final { scan-tree-dump-times "priv" 0 "optimized" } } +! { dg-final { scan-tree-dump-times "export1 \\(\\)" 1 "optimized" } } +! { dg-final { scan-tree-dump-times "export2 \\(\\)" 1 "optimized" } }