[fpc-pascal] softfloat bug?

Henry Vermaak henry.vermaak at gmail.com
Wed Mar 14 15:05:14 CET 2007

hi everyone

fpc with softfloat seems to work quite well on arm (le).  i've run
into a strange problem, though.  i've got code that looks like this:

  writeln(stderr, 'gain is ', round(scan.avge.tip.gain * 100));
  writeln(stderr, 'gain is ', format('%.0f', [scan.avge.tip.gain * 100]));

sometimes i get an eoverflow exception on the second line.  this
depends on the value of scan.avge.tip.gain.  here's a trace - might
not be very helpful:

gain is -10
An unhandled exception occurred at $0001D73C :
EOverflow : Floating point overflow
  $0001D73C  FLOAT_RAISE,  line 111 of
  $000182E8  float64_mul,  line 4387 of
  $00021858  STR_REAL,  line 361 of
  $000266C4  fpc_ansistr_float,  line 862 of
  $00060978  FLOATTOSTRFINTL,  line 1249 of
  $00061C78  FLOATTOSTRF,  line 1505 of
  $0005E89C  FORMAT,  line 250 of
  $0005F854  FORMAT,  line 895 of
  $0000A4C8  INITTAGRESULTARRAY,  line 325 of repgen.lpr
  $0000D94C  PROCESSFILE,  line 603 of repgen.lpr
  $000102B4  main,  line 819 of repgen.lpr

any help would be appreciated!


More information about the fpc-pascal mailing list