This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/13721] SEGV on inline functions


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]