"Paul@tut.cis.ohio-state.edu (11/14/88)
This bug (reported for gcc1.28) is still present. It's now handled slightly
differently (but still wrong).
/*
GNU C version 1.30 (68k, MIT syntax) compiled by GNU C version 1.30.
Produces the following erroneous output...
begin.x 1
begin.y 2
end.x 3
end.y 0
*/
struct point
{
unsigned x : 8;
unsigned y : 24;
};
typedef volatile struct point Point;
struct line
{
Point begin;
Point end;
};
typedef volatile struct line Line;
foo( Line * p )
{
printf( "begin.x %d\n", p->begin.x );
printf( "begin.y %d\n", p->begin.y );
printf( "end.x %d\n", p->end.x );
printf( "end.y %d\n", p->end.y );
}
main()
{
Line alpha;
alpha.begin.x = 1;
alpha.begin.y = 2;
alpha.end.x = 3;
alpha.end.y = 4;
foo( &alpha );
}