From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67028 invoked by alias); 24 Jun 2015 19:00:39 -0000 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 Received: (qmail 66958 invoked by uid 48); 24 Jun 2015 19:00:35 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0 Date: Wed, 24 Jun 2015 19:00: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-Version: 5.1.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg02430.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66605 --- Comment #5 from Dominique d'Humieres --- > BTW, is the resulting warning actually correct? According the gfortran manual -Wunused-parameter Contrary to gcc's meaning of -Wunused-parameter, gfortran's implementation of this option does not warn about unused dummy arguments (see -Wunused-dummy-argument), but about unused PARAMETER values. -Wunused-parameter is implied by -Wextra if also -Wunused or -Wall is used. If I understand correctly the above statement, -Wunused-parameter should not emit a warning for the test in comment 0: there is no parameter. The warning should be issued with -Wunused-dummy-argument pr66605.f90:5:25: SUBROUTINE sub (neq, time, y, dydt) 1 Warning: Unused dummy argument 'time' at (1) [-Wunused-dummy-argument]