This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/458: small number floating-point exception on DigitalUnix 4



>Number:         458
>Category:       c
>Synopsis:       small number floating-point exception on DigitalUnix 4
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 10 00:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     E. Krömer
>Release:        gcc version 2.95.2 19991024 and several older ones
>Organization:
>Environment:
system OSF1 V4.0 878 alpha (Digital Unix 4.0d)

compiler: gcc -v testi.c
Reading specs from /usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1/specs
gcc version 2.8.1
 /usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -Dunix -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -Acpu(alpha) -Amachine(alpha) -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C testi.c /tmp/ccaalnCa.i
GNU CPP version 2.8.1
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/gnu/alpha-dec-osf4.0d/include
 /usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1/include
 /usr/include
End of search list.
 /usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1/cc1 /tmp/ccaalnCa.i -quiet -dumpbase testi.c -version -o /tmp/ccaalnCa.s
GNU C version 2.8.1 (alpha-dec-osf4.0d) compiled by GNU C version 2.8.1.
 as -g -nocpp -O0 -o /tmp/ccaalnCa1.o /tmp/ccaalnCa.s
 /usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1/mips-tfile -v -o /tmp/ccaalnCa1.o /tmp/ccaalnCa.s
mips-tfile version 2.8.1
 /usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1/ld -G 8 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o -L/usr/gnu/lib/gcc-lib/alpha-dec-osf4.0d/2.8.1 -L/usr/gnu/alpha-dec-osf4.0d/lib -L/usr/lib/cmplrs/cc -L/usr/gnu/lib /tmp/ccaalnCa1.o -lgcc -lc -lgcc

>Description:
zsh: floating point exception (core dumped)  a.out

Notes: 
 multiplying a number of approx 1e-314 (should be 0, rounding errors)
 with another yields the error.

 everything > 1e-309 is ok
 everything < 1e-324 is ok (identical 0)

 core dumped in line of multiplication, * needs to be in
 a subroutine, same line in main doesn't give an error.

 Same code on Linux yields no problems

 funny: gdb 4.16 (alpha-dec-osf4.0) does very much the same:
  (gdb) p 2.0*1e-307
  $7 = 1.9999999999999998e-307
  (gdb) p 2.0*1e-308
  Erroneous arithmetic operation.
  (gdb) p 2.0*1e-323
  Erroneous arithmetic operation.
  (gdb) p 2.0*1e-324
  $8 = 0

>How-To-Repeat:
void dummy(double w, double v)
{
  double r;

  r = w*v;
  return;
}

int main()
{

  dummy(2.0,1e-314);
  return(0);
}

>Fix:
none
>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]