[coreboot] rommcc bugs

Eric W. Biederman ebiederm at xmission.com
Wed Jun 16 00:59:19 CEST 2010

Myles Watson <mylesgw at gmail.com> writes:

> On Tue, Jun 15, 2010 at 4:27 PM, Rudolf Marek <r.marek at assembler.cz> 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/coreboot@coreboot.org/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.


More information about the coreboot mailing list