This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/15948] New: THUMB -O2: Very short file causes assert failure
- From: "danfuzz at milk dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jun 2004 19:38:05 -0000
- Subject: [Bug rtl-optimization/15948] New: THUMB -O2: Very short file causes assert failure
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the following file with -O2 causes an assert failure inside gcc:
void ouch(int *s)
{
int e = s[0];
if ((e & 2) == 0) {
return;
}
s[0]=0;
s[1]=0;
}
(That's it.) The reported error is:
$ arm-elf-gcc -save-temps -c ouch.c -mthumb -O2 -o ouch.o
ouch.c: In function `ouch':
ouch.c:9: internal compiler error: in do_output_reload, at reload1.c:6895
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Here's the salient part of reload1.c:
/* If is a JUMP_INSN, we can't support output reloads yet. */
if (GET_CODE (insn) == JUMP_INSN)
abort (); // LINE 6895
Here's how I configured and built the compiler:
$ tar -xjvf gcc-core-3.4.0.tar.bz2
$ cd gcc-3.4.0
$ ./configure --prefix=/usr/local/armdev --target=arm-elf --with-newlib --enable-languages=c
The following lines were uncommented in gcc/config/arm/t-arm-elf:
MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
MULTILIB_DIRNAMES += normal interwork
MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
$ make
$ sudo make install
In case it matters, I'm currently using binutils-2.15.
--
Summary: THUMB -O2: Very short file causes assert failure
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danfuzz at milk dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ppc-mac-osx
GCC host triplet: ppc-mac-osx
GCC target triplet: arm-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15948