Subject: Re: GCC problems.
To: port-vax@netbsd.org <port-vax@netbsd.org>
From: Matthew Hudson <mhudson@home.com>
List: port-vax
Date: 09/08/1998 22:00:43
What version of GCC is being discussed? 2.7.2 or 2.8.1 ?

> I started hunting a bug this evening that caused ld to dump core
> sometimes; like when compiling rbootd or xsetroot. This turned out
> to be a bug generated by gcc; merely the way it handles bitfields:
> 
> If there is a bitfield struct of size 4 bytes, and bit 22 is referenced
> gcc will generate something like "rotl $31,2(r0)" if the bitfield address
> is in r0. This will cause bytes 2-5 to be referenced but only byte 0-3
> is legal, so a segmentation fault will occur.
> 
> If anyone like to teach gcc to DTRT i would be very happy :-) I think
> it looks like an odd way of doing this instead of using extzv.

-Matt