From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10214 invoked by alias); 24 Sep 2014 13:41: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 10172 invoked by uid 48); 24 Sep 2014 13:41:38 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63358] [4.8.3 - 4.9.1] gcc -O2/-O3 wrong assembly code (crash / Segmentation fault) Date: Wed, 24 Sep 2014 13:41: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.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED 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_severity 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-09/txt/msg02263.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63358 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal --- Comment #3 from Jonathan Wakely --- Signed integer overflow is undefined behaviour, so anything can happen. Specifically, the compiler is allowed to assume that overflow never happens, and perform optimisations based on that assumption, so if overflow *does* happen the results are unpredictable.