From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10502 invoked by alias); 17 Jul 2014 07:58:07 -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 10446 invoked by uid 55); 17 Jul 2014 07:58:04 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61741] wrong code with -fno-strict-overflow Date: Thu, 17 Jul 2014 07:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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: 2014-07/txt/msg01196.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61741 --- Comment #8 from Richard Biener --- Author: rguenth Date: Thu Jul 17 07:57:30 2014 New Revision: 212742 URL: https://gcc.gnu.org/viewcvs?rev=212742&root=gcc&view=rev Log: 2014-07-17 Richard Biener Backport from mainline 2014-07-10 Richard Biener PR c-family/61741 * c-c++-common/torture/pr61741.c: Use signed char. 2014-07-09 Richard Biener PR c-family/61741 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions using unsigned arithmetic if overflow does not wrap instead of if overflow is undefined. * c-c++-common/torture/pr61741.c: New testcase. Added: branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/pr61741.c Modified: branches/gcc-4_9-branch/gcc/c-family/ChangeLog branches/gcc-4_9-branch/gcc/c-family/c-gimplify.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog