Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: jg@crl.dec.com (Jim Gettys)
Subject: Re: Compiler Bug
Date: 26 Jul 90 13:50:21 GMT	[thread overview]
Message-ID: <5889@crltrx.crl.dec.com> (raw)
In-Reply-To: 3152@rwthinf.UUCP

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 %


  reply	other threads:[~1990-07-26 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-07-26  5:41 Compiler Bug Peter Davids
1990-07-26 13:50 ` Jim Gettys [this message]
1990-07-27 15:29 ` Steve V. Hodsdon
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox