Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!ucscc!ucsch.pravda@ucb-vax.ARPA From: ucsch.pravda@ucb-vax.ARPA Newsgroups: net.lang.c Subject: Re: C compiler test Message-ID: <2477@brl-smoke.ARPA> Date: Tue, 22-Jul-86 17:02:24 EDT Article-I.D.: brl-smok.2477 Posted: Tue Jul 22 17:02:24 1986 Date-Received: Wed, 23-Jul-86 08:15:33 EDT Sender: news@brl-smoke.ARPA Lines: 68 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@csnet-relay.ARPA pravda%ucsc%csnet-relay.arpa@CSNET-RELAY pravda@ucscc.BITNET {ucbvax,drivax,escher}!ucscc!pravda.UUCP