This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/46164] Local variables in specified registers don't work correctly with inline asm operands
- From: "tp+gcc at pambor dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Aug 2014 07:47:20 +0000
- Subject: [Bug middle-end/46164] Local variables in specified registers don't work correctly with inline asm operands
- Auto-submitted: auto-generated
- References: <bug-46164-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46164
--- Comment #4 from Tim Pambor <tp+gcc at pambor dot com> ---
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
...