Re: GCC fails with -O2 for own Target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 31.07.13 20:49, schrieb Ian Lance Taylor:
On Wed, Jul 31, 2013 at 5:35 AM, Jens Mehler <jens.mehler@xxxxxxxxxx> wrote:
After testing around I came up with a much easier example to reproduce my
error:

static unsigned char sbox[256];

void
test(void)
{
     int n;
     for (n =  0; n < 256; n++)
         sbox[n] = (unsigned char) n;
}

This results in the same error massage:
test3.c: In function 'test':
test3.c:4:1: internal compiler error: in gen_lowpart_general, at
rtlhooks.c:59

Via GDB I was able to print the RTX in question:
As you can see the code is SYMBOL_REF and therefore the error.
I am not really sure how to track that any futher.
You need to find out what is asking for the low part of a SYMBOL_REF.

Some targets can not load a symbol into a register.  Those target
break up the SYMBOL_REF in some form, typically into a PLUS of a HIGH
and a LO_SUM.  For example, the MIPS backend works this way.  You may
need to do something similar.

Ian
My target can do that don't worry :)
Currently I got it compiled with:
eco32-gcc -O1 -S -fno-tree-loop-optimize test.c

Something else I found out:
As long as the size of the array is small enough the loop gets unrolled and it works like a charm.

And I still can't find why there is a low_part requested.

I suspect and error in my machine definition. Currently I am trying to track that down.

With best regards,
Jens





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux