From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17760 invoked by alias); 9 Feb 2011 21:54:23 -0000 Received: (qmail 17744 invoked by uid 22791); 9 Feb 2011 21:54:22 -0000 X-SWARE-Spam-Status: No, hits=-2.7 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; Wed, 09 Feb 2011 21:54:18 +0000 From: "argondsgn at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/47670] Gcc 4.5.1 inconsistent optimisation of loop with mixed 32bit and 64bit arithmetic X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: argondsgn at gmail dot com X-Bugzilla-Status: CLOSED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status 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 Date: Wed, 09 Feb 2011 22:00:00 -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 X-SW-Source: 2011-02/txt/msg01255.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47670 Peter de Rivaz changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Peter de Rivaz 2011-02-09 21:54:15 UTC --- Thanks! (And sorry for the invalid report). C99 specification 6.5 para 5 agrees that this is undefined behaviour. Both suggestions solve the problem. I've closed the bug now.