This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/32971] Inline asm with offset addressing fails to compile in 4.0+ without -O
- From: "kinetik at flim dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2007 05:11:14 -0000
- Subject: [Bug inline-asm/32971] Inline asm with offset addressing fails to compile in 4.0+ without -O
- References: <bug-32971-10461@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from kinetik at flim dot org 2007-08-03 05:11 -------
(In reply to comment #2)
> asm ("lea %1(%2), %0"
> : "=r" (i)
> : "i" (offsetof(struct coord, y)),
> "r" (c)
> : "memory");
Bug #29357 suggests that I need to use %c1 rather than %1 here, and indeed this
works and I believe this is the correct solution.
I'm don't know enough to know if the original reason I opened the bug is still
valid (i.e. it's a regression), or if I'm just being bitten by behaviour
changes when I'm abusing the meaning of the operand (I suspect the latter), so
I'll leave the bug open for someone to review and confirm or close.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32971