From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127104 invoked by alias); 18 Sep 2015 15:35:32 -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 127062 invoked by uid 48); 18 Sep 2015 15:35:28 -0000 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/67629] New: bogus -Wreturn-type in a function with tautological if-else Date: Fri, 18 Sep 2015 15:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg01501.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67629 Bug ID: 67629 Summary: bogus -Wreturn-type in a function with tautological if-else Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- While testing Marek's patch for PR 64249 I noticed that both gcc and g++ incorrectly issue a -Wreturn-type warning for the following snippet: $ cat u.c && xgcc -Wreturn-type -c u.c int foo (_Bool a) { if (a) return 0; else if (!a) return 1; } u.c: In function =E2=80=98foo=E2=80=99: u.c:4:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ >>From gcc-bugs-return-497524-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 18 16:28:29 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 16703 invoked by alias); 18 Sep 2015 16:28:29 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 16626 invoked by uid 55); 18 Sep 2015 16:28:23 -0000 From: "uros at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/67619] ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425 Date: Fri, 18 Sep 2015 16:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: uros at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 4.9.4 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-09/txt/msg01502.txt.bz2 Content-length: 619 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67619 --- Comment #2 from uros at gcc dot gnu.org --- Author: uros Date: Fri Sep 18 16:27:51 2015 New Revision: 227909 URL: https://gcc.gnu.org/viewcvs?rev=227909&root=gcc&view=rev Log: PR middle-end/67619 * except.c (expand_builtin_eh_return): Use copy_addr_to_reg to copy the address to a register. testsuite/ChangeLog: PR middle-end/67619 * gcc.dg/torture/pr67619.c: New test. Added: trunk/gcc/testsuite/gcc.dg/torture/pr67619.c Modified: trunk/gcc/ChangeLog trunk/gcc/except.c trunk/gcc/testsuite/ChangeLog