ICE with inline asm in inlined function
Peter Osterlund
peter.osterlund@mailbox.swipnet.se
Sun Jan 24 02:41:00 GMT 1999
Hello,
Compiling this file generates an internal compiler error with recent
CVS versions:
---------- bug .c -------------------
inline void g()
{
int p;
volatile int _ret;
asm volatile ("xchgw %0,%1"
: "=q" (_ret), "=m" (*( &p ))
: "m" (*( &p )), "0" ( 1 ));
}
void f()
{
g();
}
-------------------------------------
[petero@ppro petero]$ gcc -v -O -Wall -c bug.c
Reading specs from /home/petero/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.02/specs
gcc version egcs-2.93.02 19990124 (gcc2 ss-980609 experimental)
/home/petero/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.02/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=93 -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ bug.c /tmp/cc3FbvVo.i
GNU CPP version egcs-2.93.02 19990124 (gcc2 ss-980609 experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/home/petero/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.02/../../../../i686-pc-linux-gnu/include
/home/petero/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.02/include
/usr/include
End of search list.
/home/petero/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.02/cc1 /tmp/cc3FbvVo.i -quiet -dumpbase bug.c -O -Wall -version -o /tmp/ccM0RohF.s
GNU C version egcs-2.93.02 19990124 (gcc2 ss-980609 experimental) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.93.02 19990124 (gcc2 ss-980609 experimental).
../../egcs/gcc/function.c:3464: Internal compiler error in function instantiate_virtual_regs_1
Please submit a full bug report to `egcs-bugs@cygnus.com'.
See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
[petero@ppro petero]$
Compiling without optimization or making g() non-inline hides the
bug. This is on an x86 Redhat 5.2 system.
--
Peter ÃÂsterlund Email: peter.osterlund@mailbox.swipnet.se
Sköndalsvägen 35 f90-pos@nada.kth.se
S-128 66 Sköndal Home page: http://home1.swipnet.se/~w-15919
Sweden Phone: +46 8 942647
More information about the Gcc-bugs
mailing list