From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30479 invoked by alias); 20 Oct 2012 08:58:36 -0000 Received: (qmail 30459 invoked by uid 48); 20 Oct 2012 08:58:19 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54997] -Wunused-function gives false warnings for procedures passed as actual argument Date: Sat, 20 Oct 2012 08:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg01812.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997 --- Comment #1 from janus at gcc dot gnu.org 2012-10-20 08:58:19 UTC --- (In reply to comment #0) > Obviously s3 is not being called directly, but it is passed to s2, so it's > certainly not unused. Well, to be honest, 'dummy' is not really used inside of 's2', but you can just add some line like this call dummy() which does not make the false warning go away either. [Of course, diagnosing that 's3' is never actually called in the original test case is not quite trivial in general, and it is not what this PR is aiming for.]