This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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

Re: GCC fails with -O2 for own Target


On Wed, Jul 31, 2013 at 5:35 AM, Jens Mehler <jens.mehler@mni.thm.de> 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


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