This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/13721] SEGV on inline functions
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2004 17:49:38 -0000
- Subject: [Bug target/13721] SEGV on inline functions
- References: <20040117170117.13721.ysato@users.sourceforge.jp>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-18 17:49 -------
Reduced source all the way:
void set_bit(int nr, char * addr)
{
__asm__("bset %w1,%0"
:"=m"(*addr)
:"g"(nr),"m"(*addr));
}
The code is invalid, use "r" instead of "g" as "g" will place things in memory which causes this seg
fault.
w is described as:
'w' print as low byte of 32 bit value
--
What |Removed |Added
----------------------------------------------------------------------------
Component|inline-asm |target
Keywords|ice-on-valid-code |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13721