[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -0.0L on Irix
From: |
Tom G. Christensen |
Subject: |
Re: -0.0L on Irix |
Date: |
Mon, 12 Jan 2009 19:28:45 +0100 |
User-agent: |
Mutt/1.4.2.2i |
On Mon, Jan 12, 2009 at 06:55:17AM -0700, Eric Blake wrote:
> According to Eric Blake on 1/9/2009 7:50 PM:
> > But so far, I've discovered this
> > about -0.0L on Irix 6.2:
> >
> > With 'cc -n32', LDBL_MIN is a compile-time constant; but with 'gcc', I get
> > an error when trying to use it to initialize a global variable (note,
> > however, that it can be used inside the body of a method):
> >
> > foo.c:9: error: initializer element is not constant
> >
> >
> > My conclusions: cc is buggy when representing -0.0L as a global variable,
> > but any variant that computes -0.0L during the body of a method works.
>
> I tested on Irix 6.2, but suspect 6.5 will have similar behavior. With
> this patch, both cc and gcc pass all 33 tests created by this:
>
> gnulib-tool --create-testdir --dir=testdir2 --with-tests ceill floorl
> frexpl isnan isnanl ldexpl roundl signbit snprintf-posix sprintf-posix
> truncl vasnprintf-posix vasprintf-posix
>
I've attempted to verify this on IRIX 6.5.30. Using MIPSpro 7.4.4m in std cc
mode all tests pass however in c99 mode test-roundl fails:
/bin/sh[9]: 6144914 Trace/BPT trap(coredump)
FAIL: test-roundl
Running it by hand gives:
$ ./test-roundl
Trace/BPT/RangeErr/DivZero/Ovflow trap (core dumped)
This test was also failing before but only with MIPSpro in c99 mode.
With gcc 4.3.1 one test fails:
test-ldexpl.c:129: assertion failed
/bin/sh[9]: 6244917 Abort(coredump)
FAIL: test-ldexpl
> whereas without the patch, cc compiled all tests but failed many of them,
> and gcc failed to even compile some of the tests. I'm going ahead and
> committing it.
>
I've verified this for IRIX 6.5.30. With MIPSpro 7.4.4m in cc mode it
failed 7 tests and in c99 mode it failed 8 tests. With gcc 4.3.1 the
build failed in test-ceill.c
-tgc