This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in ARM compiler
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Bug in ARM compiler
- From: JoergSilkeSchoen at t-online dot de (Jörg Schön)
- Date: Wed, 11 Jul 2001 13:31:44 +0200
Hello!
I have discovered the following problem with the gcc compiler for the ARM
architecture:
$ arm-linux-gcc -v
Reading specs from /usr/local/arm-linux/lib/gcc-lib/arm-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
$ arm-linux-gcc -O2 -funroll-loops -c buggy.c
buggy.c: In function `buggy':
buggy.c:29: internal error--unrecognizable insn:
(insn 427 316 312 (set (mem:SI (plus:SI (plus:SI (reg:SI 11 fp)
(const_int -4096 [0xfffff000]))
(const_int -64 [0xffffffc0])) 0)
(reg:SI 12 ip)) -1 (nil)
(nil))
$
I have tried to strip down the buggy routine as much as possible. It seems
that almost everything that is left is related to the bug.
Regards,
Joerg Schoen
--
\|/
@ @
--oOO-(_)-OOo-----------------------------------------------
Joerg Schoen; Giessener Str. 6; D-35415 Pohlheim; GERMANY
PHONE +49-6403-978580 EMAIL JoergSilkeSchoen@t-online.de
----ooO-Ooo-------------------------------------------------
typedef struct aa {
int FID,x[4];
} aa;
typedef struct {
aa *fields;
int *table;
} bb;
void buggy(aa *fieldDefs,int *defaults,int n,int mode)
{
char fName[4090]; /* bug disappears if this variable is removed */
bb *d;
int i;
for(i = 0 ; i < n ; i++) {
if(fieldDefs[i].FID & 1) mode |= 1;
d->fields[i] = fieldDefs[i];
mode |= defaults[i] ? 2 : 1;
}
if(mode & 1)
for(i = 0 ; i < n ; i++) d->table[i] = i;
}