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

sirl at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 17 20:47: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

           Summary: [3.3 regression] no longer compilable inline asm breaks
                    linux kernel compile
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: inline-asm
        AssignedTo: rth at redhat dot com
        ReportedBy: sirl at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-linux-gnu
  GCC host triplet: powerpc-linux-gnu
GCC target triplet: powerpc-linux-gnu

This C code: 
 
struct id 
{ 
  union 
    { 
      unsigned short kc16[256]; 
      unsigned long kc32[256]; 
    } u; 
}; 
 
void f (struct id *dev, unsigned int size, int idx) 
{ 
  __asm__ __volatile__ 
    ("" : "=r" (size == 4u ? dev->u.kc32[idx] : dev->u.kc16[idx])); 
  return; 
} 
 
produces this error: 
 
testasm.c: In function `f': 
testasm.c:13: error: invalid lvalue in asm statement 
 
This used to compile fine and produced correct assembly with at least 
gcc-2.95.



More information about the Gcc-bugs mailing list