[Bug optimization/13506] tcpsm.c:263: internal compiler error: Segmentation fault (WinXP / Cygwin / arm-elf-gcc 3.4), error also on x86 with GCC 3.3.1
capiman at clibb dot de
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 00:19:00 GMT 2003
------- Additional Comments From capiman at clibb dot de 2003-12-30 00:08 -------
I have minimalized the code to one small C file (no includes !)
and still can reproduce the error:
(perhaps the problem is, that the assembler code is not yet ported,
but this is still no reason to throw an segmentation fault...)
C File contains:
static inline long __byte_swap4(long val)
{
asm volatile(
"mov __tmp_reg__, %A0\n\t"
"mov %A0, %D0\n\t"
"mov %D0, __tmp_reg__\n\t"
"mov __tmp_reg__, %B0\n\t"
"mov %B0, %C0\n\t"
"mov %C0, __tmp_reg__\n\t"
: "=r" (val)
: "0" (val)
);
return(val);
}
void NutTcpInputOptions(void)
{
unsigned long c = 0;
c = __byte_swap4(c);
}
You can compile and reproduce the error with:
arm-elf-gcc -c -mcpu=arm7tdmi tcpsm.c
Hope it helps !
BTW: I have tried out to feed the same thing into normal GCC 3.3.1 for x86,
also a version compiled for cygwin and get also an error (segmentation fault
but a bit another text):
tcpsm.c: In function `__byte_swap4':
tcpsm.c:2: internal compiler error: in print_operand, at
config/i386/i386.c:6904
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|tcpsm.c:263: internal |tcpsm.c:263: internal
|compiler error: Segmentation|compiler error: Segmentation
|fault (WinXP / Cygwin / arm-|fault (WinXP / Cygwin / arm-
|elf-gcc 3.4) |elf-gcc 3.4), error also on
| |x86 with GCC 3.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13506
More information about the Gcc-bugs
mailing list