From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 872 invoked by alias); 13 Aug 2014 07:47:26 -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 826 invoked by uid 48); 13 Aug 2014 07:47:23 -0000 From: "tp+gcc at pambor dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/46164] Local variables in specified registers don't work correctly with inline asm operands Date: Wed, 13 Aug 2014 07:47: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.5.1 X-Bugzilla-Keywords: ra, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: tp+gcc at pambor dot com X-Bugzilla-Status: NEW 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: attachments.created 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-08/txt/msg00824.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46164 --- Comment #4 from Tim Pambor --- Created attachment 33307 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33307&action=edit testcase for gcc 4.9.1 I think this bug is still present in gcc 4.9.1 and 4.8.4. I could reproduce the problem with the attached testcase using gcc 4.8.4 with -O1 and -Og and 4.9.1 with -O1. -O0, -O2, -O3, -Os generated correct code. It generated the following assembler code: ... mov r0, r0 @ r0 mov r4, r4 @ r1 mov r2, r2 @ r2 ... Expected would have been: ... mov r0, r0 @ r0 mov r1, r1 @ r1 mov r2, r2 @ r2 ...