[BUG][GCC] *Serious* optimization bug: Any gcc specialists out there?

Marcel Weiher marcel at metaobject.com
Fri Aug 4 14:48:22 UTC 2000


I am not seeing any difference in the results.

----------------- test runs ------------------
marcel at spock[/tmp]cat bug.c
#include <stdio.h>
#include <math.h>

testDoubles () {
  double arg1 = 1.0e20;
  printf("\nsin(arg1): %e\n", sin(arg1));
}

int main() { testDoubles(); return 0; }
marcel at spock[/tmp]cc bug.c ; ./a.out

sin(arg1): -6.452513e-01
marcel at spock[/tmp]cc -O bug.c ; ./a.out

sin(arg1): -6.452513e-01
marcel at spock[/tmp]cc -O2 bug.c ; ./a.out

sin(arg1): -6.452513e-01
marcel at spock[/tmp]cc -O3 bug.c ; ./a.out

sin(arg1): -6.452513e-01
marcel at spock[/tmp]cc -v
Reading specs from /usr/libexec/ppc/2.7.2.1/specs
Apple Computer, Inc. version cc-783.1, based on gcc version 2.7.2.1





More information about the Squeak-dev mailing list