C compiler test

ucsch.pravda at ucb-vax.ARPA ucsch.pravda at ucb-vax.ARPA
Wed Jul 23 07:02:24 AEST 1986


On our VAX 11/750 running 4.2bsd I got the incorrect 3 and 4
both normal and optimized.

Maybe you see something in this (I'm no assembler wiz)?
output from cc -S 

LL0:
	.data
	.text
	.align	1
	.globl	_main
_main:
	.word	L12
	jbr 	L14
L15:
	movl	$8,-4(fp)
	.data
	.align	2
L16:
	.double	0d2.50000000000000000000e+00
	.text
	cvtld	-4(fp),r0
	divd2	L16,r0
	cvtdl	r0,r0
	movl	r0,-4(fp)
	.data	1
L18:
	.ascii	"i= %d\12\0"
	.text
	pushl	-4(fp)
	pushl	$L18
	calls	$2,_printf
	movl	$8,-4(fp)
	.data
	.align	2
L19:
	.double	0d2.50000000000000000000e+00
	.text
	cvtdl	L19,r0
	divl2	r0,-4(fp)
	.data	1
L20:
	.ascii	"i= %d\12\0"
	.text
	pushl	-4(fp)
	pushl	$L20
	calls	$2,_printf
	pushl	$0
	calls	$1,_exit
	ret
	.set	L12,0x0
L14:
	subl2	$4,sp
	jbr 	L15
	.data

=============
	Peter L. Rosencrantz
	Mathematics Board
	(or Campus Computer Center)
	University of California
	Santa Cruz, CA 95064

	pravda%ucsc.csnet at csnet-relay.ARPA
	pravda%ucsc%csnet-relay.arpa at CSNET-RELAY
	pravda at ucscc.BITNET
	{ucbvax,drivax,escher}!ucscc!pravda.UUCP



More information about the Comp.lang.c mailing list