This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Another ICE with egcs-current...
- To: egcs-bugs at cygnus dot com
- Subject: Another ICE with egcs-current...
- From: "Matthias Urlichs" <smurf at noris dot de>
- Date: Wed, 8 Jul 1998 15:30:02 +0200
The following code
###################
extern __inline__ int test_and_set_bit(int nr, volatile void * addr)
{
int oldbit;
__asm__ __volatile__( ""
"btsl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit),"=m" (addr)
:"ir" (nr));
return oldbit;
}
struct buffer_head {
unsigned long b_state;
};
extern void lock_buffer(struct buffer_head * bh)
{
while (test_and_set_bit(2 , &bh->b_state))
__wait_on_buffer(bh);
}
###################
generates this error
###################
gx.c: In function `lock_buffer':
gx.c:17: internal error--unrecognizable insn:
(insn 52 63 54 (parallel[
(set (reg/v:SI 26)
(asm_operands/v ("btsl %2,%1
sbbl %0,%0") ("=r") 0[
(const_int 2)
]
[
(asm_input:SI ("ir"))
] ("gx.c") 7))
(set (mem:SI (reg:SI 29))
(asm_operands/v ("btsl %2,%1
sbbl %0,%0") ("=m") 1[
(const_int 2)
]
[
(asm_input:SI ("ir"))
] ("gx.c") 7))
] ) -1 (insn_list 63 (nil))
(expr_list:REG_DEAD (reg:SI 29)
(nil)))
toplev.c:1191: Internal compiler error in function fatal_insn
###################
when compiled with this command
###################
gcc -v -O2 gx.c
###################
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.47/specs
gcc version egcs-2.91.47 19980707 (gcc2 ss-980609 experimental)
/usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.47/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__pentium__ -D__i586__ -D__i386__ -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__pentium__ -D__i586__ gx.c /tmp/cc6KZ3PY.i
GNU CPP version egcs-2.91.47 19980707 (gcc2 ss-980609 experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/i586-pc-linux-gnu/include
/usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.47/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.47/cc1 /tmp/cc6KZ3PY.i -quiet -dumpbase gx.c -O2 -version -o /tmp/cccDDIGO.s
GNU C version egcs-2.91.47 19980707 (gcc2 ss-980609 experimental) (i586-pc-linux-gnu) compiled by GNU C version egcs-2.91.45 19980701 (gcc2 ss-980609 experimental).
gx.c: In function `lock_buffer':
gx.c:17: internal error--unrecognizable insn:
(insn 52 63 54 (parallel[
(set (reg/v:SI 26)
(asm_operands/v ("btsl %2,%1
sbbl %0,%0") ("=r") 0[
(const_int 2)
]
[
(asm_input:SI ("ir"))
] ("gx.c") 7))
(set (mem:SI (reg:SI 29))
(asm_operands/v ("btsl %2,%1
sbbl %0,%0") ("=m") 1[
(const_int 2)
]
[
(asm_input:SI ("ir"))
] ("gx.c") 7))
] ) -1 (insn_list 63 (nil))
(expr_list:REG_DEAD (reg:SI 29)
(nil)))
toplev.c:1191: Internal compiler error in function fatal_insn
###################
Replacing "ir" with "i" generates an "inconsistent asm constraints" error
(why?), while "r" does not change the error from above.
--
Matthias Urlichs
noris network GmbH