This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Internal compiler error in gcc3.0.2 for ppc403


I've been using gcc3.0.2 built for ppc403 (patched to
support ppc405; see http://www.kegel.com/xgcc3/ )
for about a year with no trouble, but compiling kaffe
exposed an internal compiler error.  Since updating
to a new compiler is a somewhat major effort, I thought
I'd post details about it here, and see if anyone knows
what version of gcc (if any) fixes this problem before
I start trying versions at random.  Here's the compiler
error when building kaffe:

../../../kaffe-1.0.7-libtool1.4e/kaffe/kaffevm/support.c:1051: Insn does not satisfy its constraints:
(insn 1003 1000 533 (set (reg/v:DF 40 f8 [77])
        (mem:DF (plus:SI (reg/f:SI 31 r31)
                (const_int 8 [0x8])) 0)) 293 {*movdf_softfloat32} (nil)
    (nil))
../../../kaffe-1.0.7-libtool1.4e/kaffe/kaffevm/support.c:1051: Internal compiler error in reload_cse_simplify_operands, at reload1.c:8364

When I whittled it down to a minimal test case, the error changed to

bug1.c: In function `fn1':
bug1.c:9: Insn does not satisfy its constraints:
(insn 36 33 23 (set (reg/v:DF 33 f1 [77])
        (mem:DF (plus:SI (reg/f:SI 31 r31)
                (const_int 16 [0x10])) 0)) 293 {*movdf_softfloat32} (nil)
    (nil))
bug1.c:9: Internal compiler error in extract_constrain_insn_cached, at recog.c:2133

Here's the minimal test case:

void fn1(void)
{
    double *fpr;
    register double d0 asm("fr1");
    switch (1) {
    case 0 +1: d0 = fpr[0];;
    }
    asm ("" :: "f" (d0));
}
void fn2()
{
    fn1();
}

Neither bug is present in the same compiler built for ppc7xx, so
it's fairly processor-specific.  Poking around
a bit, I found a number of similar bugs, mostly for other processors:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=7223
ibid, 6162 6986 7151 7223 7281 8281 8514 8808
http://gcc.gnu.org/ml/gcc-bugs/2001-12/msg00872.html
which makes me suspect this bug might be lurking even
in newer compilers.

Is there anyone out there with a newer gcc for ppc405?
If so, can you try the above test, and report
back the gcc version and whether it blew up?  That will help me
decide whether to file a bug with gnu, and which version of gcc I need
to update to.

Thanks!
- Dan




------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe at sources dot redhat dot com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]