From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19624 invoked by alias); 27 May 2014 05:50:58 -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 19587 invoked by uid 48); 27 May 2014 05:50:53 -0000 From: "thomas.preudhomme at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61306] [4.10 Regression] wrong code at -Os and above on x86_64-linux-gnu Date: Tue, 27 May 2014 05:50: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-Version: 4.10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: thomas.preudhomme at arm dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.10.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: 2014-05/txt/msg02276.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61306 --- Comment #3 from Thomas Preud'homme --- Indeed. I also noticed that the original bswap code would happily accept signed ssa value and signed cast which can lead to disaster. I worked out a patch for this issue that check the sign of the lhs of the bitwise or expression and use the (unsigned_)?int.I_type_node accordingly but I now get bootstrap failure. I'll provide a patch asap.