Bug 50487 - FAIL: gfortran.dg/bessel_6.f90
Summary: FAIL: gfortran.dg/bessel_6.f90
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 17:18 UTC by H.J. Lu
Modified: 2011-09-22 18:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-09-22 17:18:16 UTC
On Linux/x86-64, with glibc bug fix for

http://sourceware.org/bugzilla/show_bug.cgi?id=11589

which changes jn precision. I got

FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
FAIL: gfortran.dg/bessel_6.f90  -O1  execution test
FAIL: gfortran.dg/bessel_6.f90  -O2  execution test
FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer -funroll-loops  execution test
FAIL: gfortran.dg/bessel_6.f90  -O3 -g  execution test
FAIL: gfortran.dg/bessel_6.f90  -Os  execution test

gfortran.dg/bessel_6.f90 compares scalar jnf vs bessel_jn_r4 in
libgfortran.  Since scalar jn is changed in glibc, it fails at

 YN for X =    34.529999      -- Epsilon =   1.19209290E-07
24  0.957530737E-02  0.957520306E-02    0.10E-06     91.3808822632  F  F
[1]    15522 abort (core dumped)  ./a.out
Comment 1 kargls 2011-09-22 17:58:19 UTC
I've had this patch in my tree for nearly a year.  I'm surprised
that glibc developers took nearly a year to apply a form of my
libm patch to their tree.


Index: gcc/testsuite/gfortran.dg/bessel_6.f90
===================================================================
--- gcc/testsuite/gfortran.dg/bessel_6.f90      (revision 179023)
+++ gcc/testsuite/gfortran.dg/bessel_6.f90      (working copy)
@@ -12,7 +12,7 @@
 implicit none
 real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78] 
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
-                  * [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 75, 15 ]
+                  * [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 92, 15 ]
 ! The following is sufficient for me - the values above are a bit
 ! more tolerant
 !                  * [0, 5, 3, 4, 6, 7, 7, 5, 5, 6, 66, 4 ]
Comment 2 H.J. Lu 2011-09-22 18:16:35 UTC
(In reply to comment #1)
> I've had this patch in my tree for nearly a year.  I'm surprised
> that glibc developers took nearly a year to apply a form of my
> libm patch to their tree.
> 
> 
> Index: gcc/testsuite/gfortran.dg/bessel_6.f90
> ===================================================================
> --- gcc/testsuite/gfortran.dg/bessel_6.f90      (revision 179023)
> +++ gcc/testsuite/gfortran.dg/bessel_6.f90      (working copy)
> @@ -12,7 +12,7 @@
>  implicit none
>  real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9,
> 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78] 
>  real,parameter :: myeps(size(values)) = epsilon(0.0) &
> -                  * [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 75, 15 ]
> +                  * [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 92, 15 ]
>  ! The following is sufficient for me - the values above are a bit
>  ! more tolerant
>  !                  * [0, 5, 3, 4, 6, 7, 7, 5, 5, 6, 66, 4 ]

It works for me.  Can you check it in?
Comment 3 Steve Kargl 2011-09-22 18:19:07 UTC
On Thu, Sep 22, 2011 at 06:16:35PM +0000, hjl.tools at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50487
> 
> H.J. Lu <hjl.tools at gmail dot com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>           Component|libfortran                  |testsuite
>    Target Milestone|---                         |4.7.0
> 
> --- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-22 18:16:35 UTC ---
> (In reply to comment #1)
> > I've had this patch in my tree for nearly a year.  I'm surprised
> > that glibc developers took nearly a year to apply a form of my
> > libm patch to their tree.
> > 
> > 
> > Index: gcc/testsuite/gfortran.dg/bessel_6.f90
> > ===================================================================
> > --- gcc/testsuite/gfortran.dg/bessel_6.f90      (revision 179023)
> > +++ gcc/testsuite/gfortran.dg/bessel_6.f90      (working copy)
> > @@ -12,7 +12,7 @@
> >  implicit none
> >  real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9,
> > 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78] 
> >  real,parameter :: myeps(size(values)) = epsilon(0.0) &
> > -                  * [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 75, 15 ]
> > +                  * [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 92, 15 ]
> >  ! The following is sufficient for me - the values above are a bit
> >  ! more tolerant
> >  !                  * [0, 5, 3, 4, 6, 7, 7, 5, 5, 6, 66, 4 ]
> 
> It works for me.  Can you check it in?
> 

Sure, do you want me to apply it to 4.5 and 4.6 as well.
Comment 4 H.J. Lu 2011-09-22 18:22:25 UTC
(In reply to comment #3)
> > 
> > It works for me.  Can you check it in?
> > 
> 
> Sure, do you want me to apply it to 4.5 and 4.6 as well.

Yes, please.
Comment 5 kargls 2011-09-22 18:28:18 UTC
Author: kargl
Date: Thu Sep 22 18:28:14 2011
New Revision: 179097

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179097
Log:
2011-09-22  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR testsuite/50487
	* gfortran.dg/bessel_6.f90: Fix tolerance test.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/bessel_6.f90
Comment 6 kargls 2011-09-22 18:30:42 UTC
Author: kargl
Date: Thu Sep 22 18:30:36 2011
New Revision: 179098

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179098
Log:
011-09-22  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR testsuite/50487
	* gfortran.dg/bessel_6.f90: Fix tolerance test.

Modified:
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/bessel_6.f90
Comment 7 Steve Kargl 2011-09-22 18:35:09 UTC
On Thu, Sep 22, 2011 at 06:22:25PM +0000, hjl.tools at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50487
> 
> --- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-22 18:22:25 UTC ---
> (In reply to comment #3)
> > > 
> > > It works for me.  Can you check it in?
> > > 
> > 
> > Sure, do you want me to apply it to 4.5 and 4.6 as well.
> 
> Yes, please.
> 

Fixed on 4.6 and trunk.  bessel_6.f90 only exists on these branches.
Comment 8 kargls 2011-09-22 18:35:30 UTC
Fixed.