From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18363 invoked by alias); 1 May 2013 05:13:44 -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 18327 invoked by uid 48); 1 May 2013 05:13:39 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/57124] 254.gap@spec2000 got miscompare after r198413 Date: Wed, 01 May 2013 05:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: law at redhat dot com 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 X-SW-Source: 2013-05/txt/msg00000.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57124 --- Comment #2 from Jeffrey A. Law 2013-05-01 05:13:38 UTC --- __attribute__ ((noinline)) foo(short unsigned int *p1, short unsigned int *p2) { short unsigned int x1, x4; int x2, x3, x5, x6; unsigned int x7; x1 = *p1; x2 = (int) x1; x3 = x2 * 65536; x4 = *p2; x5 = (int) x4; x6 = x3 + x4; x7 = (unsigned int) x6; if (x7 <= 268435455U) abort (); exit (0); } main() { short unsigned int x, y; x = -5; y = -10; foo (&x, &y); } Is a much reduced testcase. Ultimately we have a range for x6 that's [0, +INF(OVF)] at which point it's not safe to replace x7 with x6 in the conditional.