Optimizer Bug in SysV 3.1 C Compiler
Earl Chew
earl at wcc.oz
Wed Feb 10 06:37:35 AEST 1988
Hello World,
There appears to be a bug in the optimizer of the System V/VME 3.1 C Compiler
(Rel 2.0). Compile the following with:
cc -o foo foo.c
and it will print 1.0000. Compile with
cc -O -o foo foo.c
and I get a bus error (core dumped). Can anyone help?
Regards,
Earl Chew
Webster Computer R & D
--------Cut Here-------
main()
{
double v;
void setvar();
setvar(&v, 1.0);
(void) printf("%f\n", v);
return 0;
}
void
setvar(v, n)
double *v, n;
{
*v = n;
}
--------Cut Here---------
More information about the Comp.unix.wizards
mailing list