This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/20718] "+r" constraint with uninitialized value
- From: "pbrook at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jul 2005 21:06:31 -0000
- Subject: [Bug inline-asm/20718] "+r" constraint with uninitialized value
- References: <20050401163947.20718.jakub@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pbrook at gcc dot gnu dot org 2005-07-21 21:06 -------
gcc4 behaviour seems fine to me.
A slightly simpler example
int foo(int a)
{
int b;
asm ("" : "+r" (b) : "r" (a));
return b;
}
Can be (and is) legitimately be transformed into
int foo(int a)
{
asm ("" : "+r" (a) : "r" (a));
return a;
}
In which case it's much more obvious that the compiler is going to allocate
the same register.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20718