This is the mail archive of the gcc-regression@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]
Other format: [Raw text]

Re: 1 GCC HEAD regressions, 1 new, with your patch on 2005-01-07T15:37:24Z.


Andrew Pinski <pinskia@physics.uc.edu> writes:

> On Jan 8, 2005, at 7:04 AM, GCC regression checker wrote:
> 
> > With your recent patch, GCC HEAD has some regression test failures,
> > which used to pass.  There are 1 new failures, and 0
> > failures that existed before and after that patch; 0 failures
> > have been fixed.
> >
> > The new failures are:
> > native libstdc++.sum 18_support/numeric_limits.cc
> 
> I almost think this was caused by:
> +2005-01-06  Geoffrey Keating  <geoffk@apple.com>
> +
> +	* c-cppbuiltin.c (builtin_define_float_constants): Set __*_EPSILON__
> +	for IBM long double format correctly.
> 
> The error message from that failure:
> /Users/regress/tbox/cvs-gcc/gcc/libstdc++-v3/testsuite/18_support/
> numeric_limits.cc:81: failed assertion `one != (one + epsilon)'
> 
> And the code from that testcase:
> template<typename T>
> void test_epsilon()
> {
>    bool test __attribute__((unused)) = true;
>    T epsilon = std::numeric_limits<T>::epsilon();
>    T one = 1;
> 
>    VERIFY( one != (one + epsilon) );
> }
> 
> So to me, this looks like the epsilon is not correct after this
> change or is this just invoking undefined behavior (which I really
> doubt it because of the definition of epsilon is what this test is
> testing, well it is testing to make sure that it is at least bigger
> than the real epsilon).

This is because GCC's internal real-number folding stuff is not
accurate for the IBM/Darwin 'long double'.  The test would work if
'epsilon' was declared 'volatile'.  I think it should probably be
XFAILed for the 4.0 release.


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