Path: utzoo!attcan!uunet!decwrl!bacchus.pa.dec.com!deccrl!crltrx!jg From: jg@crl.dec.com (Jim Gettys) Newsgroups: comp.sys.dec Subject: Re: Compiler Bug Message-ID: <5889@crltrx.crl.dec.com> Date: 26 Jul 90 13:50:21 GMT References: <3152@rwthinf.UUCP> Sender: news@crltrx.crl.dec.com Reply-To: jg@crl.dec.com (Jim Gettys) Distribution: comp Organization: DEC Cambridge Research Lab Lines: 39 Sounds like a bug under 3.1.... Results under 4.0 (which has a new compiler suite...) cat >foo.c char * malloc(); main() { char * ba; int i=3; printf("%d\n", i*(-6) ); ba = malloc (100); printf("%d\n", i*(-6) ); } zorch % cc -O foo.c -o foo zorch % foo -18 -18 zorch % cc foo.c -o foo zorch % foo -18 -18 zorch % cc -O0 foo.c -o foo zorch % foo -18 -18 zorch % cc -O3 foo.c -o foo zorch % foo -18 -18 zorch % cc -O4 foo.c -o foo zorch % foo -18 -18 zorch % cc -O1 foo.c -o foo zorch % foo -18 -18 zorch %