[gnu.gcc.bug] gcc 1.28 on Sun 3 bug

paul@UUNET.UU.NET (Paul Hudson) (11/02/88)

/*
    GNU C version 1.28 (68k, MIT syntax) compiled by GNU C version 1.28.
    
    Produces the following erroneous output...

	begin.x 1
	begin.y 2
	end.x 3
	end.y 515
*/

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 );
    }