This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14678] New: m6811-elf-gcc ICE
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Mar 2004 08:41:27 -0000
- Subject: [Bug target/14678] New: m6811-elf-gcc ICE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc ICE if I do:
================
$ m6811-elf-gcc -c -O3 -fomit-frame-pointer -m68hc12 -mshort a.cpp
$ m6811-elf-gcc -c -O2 -fomit-frame-pointer -m68hc12 -mshort a.cpp
Here is a ICE msg:
==================
a.cpp: In function `int test(int, char**)':
a.cpp:59: error: insn does not satisfy its constraints:
(insn:HI 318 546 324 17 (set (mem/s:QI (symbol_ref:HI ("*_ZZ4testiPPcE5wrbuf") <var_decl 0x400bbbd0 wrbuf>) [0 wrbuf+0 S1 A8])
(mem:QI (plus:HI (reg/f:HI 3 sp)
(const_int 16 [0x10])) [21 S1 A8])) 30 {*movqi_68hc12} (insn_list 317 (nil))
(nil))
a.cpp:59: internal compiler error: in reload_cse_simplify_operands, at postreload.c:378
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Here is a 'a.cpp':
==================
typedef unsigned int size_t;
extern "C" void *memcpy(void *__dest, const void *__src, size_t __n);
extern "C" int strcmp(const char *__s, const char *__t);
extern "C" int printf(const char *__format, ...);
extern void writebuf(const unsigned char *, unsigned short);
volatile unsigned char busy;
inline static unsigned char isBusy() { return busy; }
int
test(int argc, char *argv[])
{
static unsigned char buf[8], wrbuf[3];
static unsigned short addr;
if (argc > 1 && !strcmp(argv[1], "wr"))
{
addr = 0x0000;
memcpy(buf, (unsigned char*)0x3000, sizeof(buf));
for (unsigned char i = 0; i < sizeof(buf); ++i)
{
wrbuf[0] = (unsigned char) (addr >> 8);
wrbuf[1] = (unsigned char) addr;
wrbuf[2] = buf[i];
while (isBusy());
writebuf(wrbuf, 3);
++addr;
}
}
else if (argc > 1 && !strcmp(argv[1], "wr1"))
{
memcpy(buf, (unsigned char*)(0x3000 + sizeof(buf)), sizeof(buf));
addr = 0x0008;
for (unsigned char i = 0; i < sizeof(buf); ++i)
{
wrbuf[0] = (unsigned char) (addr >> 8);
wrbuf[1] = (unsigned char) addr;
wrbuf[2] = buf[i];
while (isBusy());
writebuf(wrbuf, 3);
++addr;
}
}
else if (argc > 1 && !strcmp(argv[1], "wr2"))
{
printf("wr: %x\n", *(unsigned short*)(&buf[0]));
for (unsigned char i = 0; i < 2; ++i)
{
wrbuf[0] = (unsigned char) (addr >> 8);
wrbuf[1] = (unsigned char) addr;
wrbuf[2] = buf[i];
while (isBusy());
writebuf(wrbuf, 3);
++addr;
}
}
return 0;
}
Environment:
System: Linux namsh 2.6.5-rc2 #68 Mon Mar 22 10:33:09 KST 2004 i686 athlon i386 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: m6811-unknown-none
configured with: ../configure --disable-nls --target=m6811-elf --prefix=/usr/GNUHCS --program-prefix=m6811-elf- --with-gnu-ld --with-gnu-as --disable-shared --enable-languages=c,c++ --without-headers --with-newlib
How-To-Repeat:
Compile the 'a.cpp' with a given compile option.
------- Additional Comments From namsh at kldp dot org 2004-03-22 08:41 -------
Fix:
Change the compile option. For example:
1. Use '-O1' instead of '-O2' or '-O3'.
2. Do not use '-fomit-frame-pointer'.
--
Summary: m6811-elf-gcc ICE
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: namsh at kldp dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m6811-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14678