From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19116 invoked by alias); 11 Dec 2011 20:48:59 -0000 Received: (qmail 19106 invoked by uid 22791); 11 Dec 2011 20:48:58 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Dec 2011 20:48:46 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50923] [4.4/4.5/4.6/4.7 Regression] No warning if function return value is not set Date: Sun, 11 Dec 2011 20:57: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: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.7 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: 2011-12/txt/msg01179.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50923 --- Comment #3 from Tobias Burnus 2011-12-11 20:44:32 UTC --- Author: burnus Date: Sun Dec 11 20:44:30 2011 New Revision: 182211 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182211 Log: 2011-12-11 Tobias Burnus PR fortran/50923 * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only if the front end has printed a warning. (gfc_generate_function_code): Fix unset-result warning. 2011-12-11 Tobias Burnus PR fortran/50923 * gfortran.dg/warn_function_without_result_2.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog