From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8113 invoked by alias); 13 Sep 2013 17:31:54 -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 8057 invoked by uid 48); 13 Sep 2013 17:31:52 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/58387] [4.9 Regression] wrong code at -Os and above on x86_64-linux-gnu (both 32-bit and 64-bit modes) Date: Fri, 13 Sep 2013 17:31: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: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 4.9.0 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: 2013-09/txt/msg01009.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58387 --- Comment #19 from Marc Glisse --- (In reply to Jeffrey A. Law from comment #18) > I'll also note that the plan for the isolated paths that exhibit undefined > behaviour is to have them trap/abort at the statement which triggers the > undefined behaviour. Not even a -fif-it-is-undefined-I-deserve-what-I-get option (or -fmy-program-will-not-abort which turns __builtin_abort into __builtin_unreachable)? I understand that if I try to debug a program by adding printf to check that this branch is not taken and it is taken but nothing is printed, I'll be confused. But don't we lose a large part of the benefit by only propagating the detection of undefined behavior forward (abort) and not also backward (unreachable)?