[gnu.gcc.bug] gcc 1.35/i386g fp subtraction bug

jjc@UUNET.UU.NET (James Clark) (05/22/89)

The following program compiled by gcc -g outputs -4 rather than 4.

double foo()
{
  return 1.0;
}

main()
{
  double x = 5.0;
  x -= foo();
  printf("%g\n", x);
}

gcc is version 1.35 for 80386 with gas (configured with config.gcc
i386g) compiled by itself running on a 386 PC with SVR3.2 (386/ix
2.0.1). I was using gas version 1.31.

James Clark
jjc@jclark.uucp