From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2027 invoked by alias); 6 Aug 2013 16:42:24 -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 1905 invoked by uid 48); 6 Aug 2013 16:42:21 -0000 From: "mikpe at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/58092] BEQ (Branch on equal) jumps to wrong address (executes conditional code!) Date: Tue, 06 Aug 2013 16:42: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.6.4 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpe at it dot uu.se X-Bugzilla-Status: UNCONFIRMED 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: 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-08/txt/msg00382.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58092 --- Comment #5 from Mikael Pettersson --- I can't reproduce the wrong-code with 4.6.4. 4.7.2, or 4.8.1. They all generate: 00000000 : 0: 24020002 li v0,2 4: aca20000 sw v0,0(a1) 8: 24020004 li v0,4 c: 14820002 bne a0,v0,18 10: 24020008 li v0,8 14: aca20040 sw v0,64(a1) 18: 03e00008 jr ra 1c: 00000000 nop which looks correct to me (not that I know MIPS very well). Please try with a self-compiled gcc built from unmodified sources, or report this to openwrt as your hacked gcc clearly indicated (see the bugurl in comment #1).