Myles Watson <[email protected]> writes:

> On Tue, Jun 15, 2010 at 4:27 PM, Rudolf Marek <[email protected]> wrote:
>> Hi all,
>>
>> While working on netconsole for ROMCC I noticed following:
>>
>> int main(void)
>> {
>>        /* volatile */
>>        union {
>>                unsigned char  byte[2];
>>                unsigned short word;
>>        } value;
>>
>>        value.byte[1] = 1;
>> }
>>
>> ./build/util/romcc/romcc -mcpu=p2 a.c
>>
>> a.c:9.18:
>> 0x86bb968 tuple      Internal compiler error: tuple used
> This case looks familiar.
>
>>From this message:
> http://www.mail-archive.com/[email protected]/msg22555.html
>
>> Looking at the rest fragment that has been passed around I think the
>> actual bug is that romcc allows non-static non-const arrays to be
>> declared.  I can not find any indication that I ever added support for
>> this when I wrote romcc.

That would be it.

Unions where you write a value in as one type, and read it out as
another type also will not work with romcc.

It does looks like I need a better error check at the declaration of
variables, I missed dealing with an array inside a union ick.

Eric

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to