[Bug inline-asm/11564] [3.3/3.4 regression] no longer compilable inline asm breaks linux kernel compile

pinskia at physics dot uc dot edu gcc-bugzilla@gcc.gnu.org
Thu Jul 17 21:14:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11564


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3 regression] no longer  |[3.3/3.4 regression] no
                   |compilable inline asm breaks|longer compilable inline asm
                   |linux kernel compile        |breaks linux kernel compile


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-17 21:13 -------
It also happens on the mainline (20030717) but I think this code is invalid as the error 
meesages, it is not a lvalue.
I think the correct thing to do is to correct the code:
void f (struct id *dev, unsigned int size, int idx)
{
  int t;
  __asm__ __volatile__
    ("" : "=r" (t));
  if(size == 4u)
    dev->u.kc32[idx] = t;
  else
    dev->u.kc16[idx] = t;
  return;
}

Which produces the same results on 2.95.3 as previous code and actually compiles on 
3.3 and the mainline.



More information about the Gcc-bugs mailing list