[comp.sys.ibm.pc] YA TC bug

ssnyder@tybalt.caltech.edu (Scott S. Snyder) (08/17/87)

TC seems to have a bug with bitfields.

This program:

	foo(z)
	struct {int a; int b:1;} *z;
	{
	  z->a = z->b = 1;
	}

produces the following code when compiled with the large memory model:

_foo	proc	far
	push	bp
	mov	bp,sp

	les	bx,dword ptr [bp+6]
	and	word ptr es:[bx+2],-2
	or	word ptr es:[bx+2],1
	mov	ax,1
	push	es	; NO CORRESPONDING POPs!!!
	push	bx
	les	bx,dword ptr [bp+6]
	mov	word ptr es:[bx],ax
@1:
	pop	bp
	ret	
_foo	endp