develooper Front page | perl.perl5.porters | Postings from May 2003

"neat" gcc bug in netbsd/sparc64

Thread Next
Jarkko Hietaniemi
May 23, 2003 03:52
"neat" gcc bug in netbsd/sparc64
Message ID:
Time::HiRes.t was hanging in netbsd/sparc64 and thanks to alian's help
I found the following weirdo bug (which caused sleep(0.5) trying to
sleep for -500_000 microseconds...)  Anyone who knows the right
channel to file this bug to the netbsd/sparc64 folks and/or the gcc
sparc64 people, please feel free to do so.  In the meanwhile I'll
try to to figure out a portable workaround.

-bash-2.05b$ cat x.c
#include <stdio.h>
int main() {
  double d = 0.5;
  double x = d - (unsigned long)d;
  double y = d - (unsigned long)d;
  printf("d = %g\n", d);
  printf("x = %g\n", x);
  printf("y = %g\n", y);
  return 0;
-bash-2.05b$ gcc -o x x.c
-bash-2.05b$ ./x
d = 0.5
x = 0.5
y = -0.5
-bash-2.05b$ gcc -v
Reading specs from /usr/lib/gcc-lib/sparc64-unknown-openbsd3.3/2.95.3/specs
gcc version 2.95.3 20010125 (prerelease, propolice)

Jarkko Hietaniemi <> "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About