* [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values @ 2017-11-17 20:54 Ed Smith-Rowland 2017-11-17 21:24 ` Jonathan Wakely 0 siblings, 1 reply; 13+ messages in thread From: Ed Smith-Rowland @ 2017-11-17 20:54 UTC (permalink / raw) To: libstdc++, gcc-patches, Jonathan Wakely, redi [-- Attachment #1: Type: text/plain, Size: 798 bytes --] This is an embarrassment actually, after the excellent analysis in the PR trail. We've (I've) been using the wrong sign convention for the nu parameter in comp_ellint_3 and in ellint_3 in tr1 and now std for years. In my defence the World seems about evenly split on this with GSL, Abramowitz&Stegun (and DLMF) and Carlson (that's what actually got me here) on the +nu side, and tr1/std, boost on the other -nu side. We need to get this into 8. I'm not sure about backporting to 7. I don't think we should change this breaking in the middle of a release series. I'll write a Mea Culpa warning about changing ellint_3, comp_ellint_3 in the release notes and in the libstdc++ pages and the tr29124 conformance page later. This builds and passes on x86-64-linux. OK for 8? Ed [-- Attachment #2: pr66689.CL --] [-- Type: text/plain, Size: 4365 bytes --] 2017-11-17 Edward Smith-Rowland <3dw4rd@verizon.net> PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values * include/tr1/ell_integral.tcc: Correct the nu sign convention in ellint_3 and comp_ellint_3. * testsuite/tr1/5_numerical_facilities/special_functions/ 06_comp_ellint_3/check_value.cc: Regen with correct values. * testsuite/tr1/5_numerical_facilities/special_functions/ 14_ellint_3/check_value.cc: Ditto. * testsuite/special_functions/06_comp_ellint_3/check_value.cc: Ditto. * testsuite/special_functions/13_ellint_3/check_value.cc: Ditto. * testsuite/tr1/5_numerical_facilities/special_functions/ 01_assoc_laguerre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 02_assoc_legendre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 03_beta/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 04_comp_ellint_1/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 05_comp_ellint_2/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 07_conf_hyperg/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 08_cyl_bessel_i/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 09_cyl_bessel_j/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 10_cyl_bessel_k/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 11_cyl_neumann/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 12_ellint_1/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 13_ellint_2/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 15_expint/check_value_neg.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 16_hermite/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 17_hyperg/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 18_laguerre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 19_legendre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 20_riemann_zeta/check_value_neg.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 21_sph_bessel/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 22_sph_legendre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 23_sph_neumann/check_value.cc: Regen. * testsuite/ext/special_functions/conf_hyperg/check_value.cc: Regen. * testsuite/ext/special_functions/hyperg/check_value.cc: Regen. * testsuite/special_functions/01_assoc_laguerre/check_value.cc: Regen. * testsuite/special_functions/02_assoc_legendre/check_value.cc: Regen. * testsuite/special_functions/03_beta/check_value.cc: Regen. * testsuite/special_functions/04_comp_ellint_1/check_value.cc: Regen. * testsuite/special_functions/05_comp_ellint_2/check_value.cc: Regen. * testsuite/special_functions/07_cyl_bessel_i/check_value.cc: Regen. * testsuite/special_functions/08_cyl_bessel_j/check_value.cc: Regen. * testsuite/special_functions/09_cyl_bessel_k/check_value.cc: Regen. * testsuite/special_functions/10_cyl_neumann/check_value.cc: Regen. * testsuite/special_functions/11_ellint_1/check_value.cc: Regen. * testsuite/special_functions/12_ellint_2/check_value.cc: Regen. * testsuite/special_functions/14_expint/check_value.cc: Regen. * testsuite/special_functions/15_hermite/check_value.cc: Regen. * testsuite/special_functions/16_laguerre/check_value.cc: Regen. * testsuite/special_functions/17_legendre/check_value.cc: Regen. * testsuite/special_functions/18_riemann_zeta/check_value.cc: Regen. * testsuite/special_functions/19_sph_bessel/check_value.cc: Regen. * testsuite/special_functions/20_sph_legendre/check_value.cc: Regen. * testsuite/special_functions/21_sph_neumann/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 06_comp_ellint_3/pr66689.cc: New. * testsuite/tr1/5_numerical_facilities/special_functions/ 14_ellint_3/pr66689.cc: New. * testsuite/special_functions/06_comp_ellint_3/pr66689.cc: New. * testsuite/special_functions/13_ellint_3/pr66689.cc: New. [-- Attachment #3: pr66689.patch.bz2 --] [-- Type: application/x-bzip, Size: 246417 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-17 20:54 [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values Ed Smith-Rowland @ 2017-11-17 21:24 ` Jonathan Wakely 2017-11-18 17:47 ` Ed Smith-Rowland 0 siblings, 1 reply; 13+ messages in thread From: Jonathan Wakely @ 2017-11-17 21:24 UTC (permalink / raw) To: Ed Smith-Rowland; +Cc: libstdc++, gcc-patches, Jonathan Wakely, redi On 17/11/17 15:05 -0500, Ed Smith-Rowland wrote: >This is an embarrassment actually, after the excellent analysis in the >PR trail. > >We've (I've) been using the wrong sign convention for the nu parameter >in comp_ellint_3 and in ellint_3 in tr1 and now std for years. In my >defence the World seems about evenly split on this with GSL, >Abramowitz&Stegun (and DLMF) and Carlson (that's what actually got me >here) on the +nu side, and tr1/std, boost on the other -nu side. > >We need to get this into 8. > >I'm not sure about backporting to 7. I don't think we should change >this breaking in the middle of a release series. Hmm, you're probably right. I'd be tempted to though. >I'll write a Mea Culpa warning about changing ellint_3, comp_ellint_3 >in the release notes and in the libstdc++ pages and the tr29124 >conformance page later. > >This builds and passes on x86-64-linux. > >OK for 8? OK, thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-17 21:24 ` Jonathan Wakely @ 2017-11-18 17:47 ` Ed Smith-Rowland 2017-11-20 17:04 ` Jonathan Wakely 2017-11-21 11:39 ` Florian Weimer 0 siblings, 2 replies; 13+ messages in thread From: Ed Smith-Rowland @ 2017-11-18 17:47 UTC (permalink / raw) To: Jonathan Wakely; +Cc: libstdc++, gcc-patches, Jonathan Wakely, redi On 11/17/2017 03:54 PM, Jonathan Wakely wrote: > > Hmm, you're probably right. I'd be tempted to though. > I had an idea. What about a macro _GLIBCXX_ELLINT_3_POS_NU or something that: 1. would allow users to detect which convention is on by default. 2. They could set or unset to get the other convention. It's bloody but it would work. it would prevent users from having to test the compiler version and guess or check the value every time. I feel that distros are likely to pick up gcc-7 soon and I'd like to do *something*. This would be something of a transition path. Ed ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-18 17:47 ` Ed Smith-Rowland @ 2017-11-20 17:04 ` Jonathan Wakely 2017-11-21 11:39 ` Florian Weimer 1 sibling, 0 replies; 13+ messages in thread From: Jonathan Wakely @ 2017-11-20 17:04 UTC (permalink / raw) To: Ed Smith-Rowland; +Cc: libstdc++, gcc-patches, Jonathan Wakely, redi On 18/11/17 11:49 -0500, Ed Smith-Rowland wrote: >On 11/17/2017 03:54 PM, Jonathan Wakely wrote: >> >>Hmm, you're probably right. I'd be tempted to though. >> >I had an idea. What about a macro _GLIBCXX_ELLINT_3_POS_NU or >something that: > >1. would allow users to detect which convention is on by default. > >2. They could set or unset to get the other convention. > >It's bloody but it would work. it would prevent users from having to >test the compiler version and guess or check the value every time. True, but I'd prefer not to have to maintain that forever, it's just another variation that needs to be tested. >I feel that distros are likely to pick up gcc-7 soon and I'd like to >do *something*. This would be something of a transition path. Fedora 26 has been shipping with GCC 7 for some months, and Fedora 27 is just out, also using GCC 7. Maybe we should just change it for GCC 8 as you suggested initially. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-18 17:47 ` Ed Smith-Rowland 2017-11-20 17:04 ` Jonathan Wakely @ 2017-11-21 11:39 ` Florian Weimer 2017-11-21 13:51 ` Jonathan Wakely 2017-11-22 0:30 ` Joseph Myers 1 sibling, 2 replies; 13+ messages in thread From: Florian Weimer @ 2017-11-21 11:39 UTC (permalink / raw) To: Ed Smith-Rowland, Jonathan Wakely Cc: libstdc++, gcc-patches, Jonathan Wakely, redi On 11/18/2017 05:49 PM, Ed Smith-Rowland wrote: > I feel that distros are likely to pick up gcc-7 soon and I'd like to do > *something*. This would be something of a transition path. Historically, in glibc, we would have used symbol versioning for this, so that existing binaries retain the old behavior. The downside is that blind recompilation will give you the change in behavior, so it essentially benefits proprietary software vendors only, which is why I think it's usually not appropriate to do this because either you want the fix for all applications, recompiled or not, or you don't. In addition, in Fedora and downstream, we cannot backport new symbol versions unless the symbol version is unique to the feature/bug fix being added, due to the way RPM dependencies are generated. Thanks, Florian ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-21 11:39 ` Florian Weimer @ 2017-11-21 13:51 ` Jonathan Wakely 2017-11-22 0:30 ` Joseph Myers 1 sibling, 0 replies; 13+ messages in thread From: Jonathan Wakely @ 2017-11-21 13:51 UTC (permalink / raw) To: Florian Weimer Cc: Ed Smith-Rowland, libstdc++, gcc-patches, Jonathan Wakely, redi On 21/11/17 12:33 +0100, Florian Weimer wrote: >On 11/18/2017 05:49 PM, Ed Smith-Rowland wrote: >>I feel that distros are likely to pick up gcc-7 soon and I'd like to >>do *something*. This would be something of a transition path. > >Historically, in glibc, we would have used symbol versioning for this, >so that existing binaries retain the old behavior. The downside is >that blind recompilation will give you the change in behavior, so it >essentially benefits proprietary software vendors only, which is why I >think it's usually not appropriate to do this because either you want >the fix for all applications, recompiled or not, or you don't. > >In addition, in Fedora and downstream, we cannot backport new symbol >versions unless the symbol version is unique to the feature/bug fix >being added, due to the way RPM dependencies are generated. None of these functions is exported from the library, they're all header-only inline functions or function templates. So the good news is existing binaries retain the old behaviour, but the bad news is we can't version it easily, and so if you link together objects built with old and new versions of GCC you have a one-definition rule violation and the linker will just pick one of the symbols to be kept. We could put them in an inline namespace, so they mangle differently, so then the old and new objects would call different versions of the functions, with different results. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-21 11:39 ` Florian Weimer 2017-11-21 13:51 ` Jonathan Wakely @ 2017-11-22 0:30 ` Joseph Myers 1 sibling, 0 replies; 13+ messages in thread From: Joseph Myers @ 2017-11-22 0:30 UTC (permalink / raw) To: Florian Weimer Cc: Ed Smith-Rowland, Jonathan Wakely, libstdc++, gcc-patches, Jonathan Wakely, redi [-- Attachment #1: Type: text/plain, Size: 567 bytes --] On Tue, 21 Nov 2017, Florian Weimer wrote: > On 11/18/2017 05:49 PM, Ed Smith-Rowland wrote: > > I feel that distros are likely to pick up gcc-7 soon and I'd like to do > > *something*. This would be something of a transition path. > > Historically, in glibc, we would have used symbol versioning for this, so that > existing binaries retain the old behavior. The downside is that blind However, when cproj was fixed, having computed completely the wrong function (glibc bug 10401), no symbol versioning was used. -- Joseph S. Myers joseph@codesourcery.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values @ 2017-11-20 16:31 David Edelsohn 2017-11-20 20:58 ` Christophe Lyon 0 siblings, 1 reply; 13+ messages in thread From: David Edelsohn @ 2017-11-20 16:31 UTC (permalink / raw) To: Ed Smith-Rowland; +Cc: libstdc++, gcc-patches, Jonathan Wakely, redi This patch has introduced new regressions on at least PowerPC and AArch64. FAIL: ext/special_functions/hyperg/check_value.cc execution test FAIL: tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc execution test Thanks, David ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-20 16:31 David Edelsohn @ 2017-11-20 20:58 ` Christophe Lyon 2017-11-20 21:03 ` Jonathan Wakely 0 siblings, 1 reply; 13+ messages in thread From: Christophe Lyon @ 2017-11-20 20:58 UTC (permalink / raw) To: David Edelsohn Cc: Ed Smith-Rowland, libstdc++, gcc-patches, Jonathan Wakely, redi On 20 November 2017 at 17:02, David Edelsohn <dje.gcc@gmail.com> wrote: > This patch has introduced new regressions on at least PowerPC and AArch64. > > FAIL: ext/special_functions/hyperg/check_value.cc execution test > FAIL: tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc > execution test > > Thanks, David On AArch64 and ARM, I have also noticed FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors) UNRESOLVED: special_functions/18_riemann_zeta/check_value.cc compilation failed to produce executable because: /libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: In function 'void test(const testcase_riemann_zeta<Ret> (&)[Num], Ret)': /libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: error: 'riemann_zeta' is not a member of 'std' /libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: note: suggested alternative: 'remainder' compiler exited with status 1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-20 20:58 ` Christophe Lyon @ 2017-11-20 21:03 ` Jonathan Wakely 2017-11-20 21:10 ` Jonathan Wakely 0 siblings, 1 reply; 13+ messages in thread From: Jonathan Wakely @ 2017-11-20 21:03 UTC (permalink / raw) To: Christophe Lyon Cc: David Edelsohn, Ed Smith-Rowland, libstdc++, gcc-patches, Jonathan Wakely, redi On 20/11/17 21:43 +0100, Christophe Lyon wrote: >On 20 November 2017 at 17:02, David Edelsohn <dje.gcc@gmail.com> wrote: >> This patch has introduced new regressions on at least PowerPC and AArch64. >> >> FAIL: ext/special_functions/hyperg/check_value.cc execution test >> FAIL: tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc >> execution test >> >> Thanks, David > >On AArch64 and ARM, I have also noticed >FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors) >UNRESOLVED: special_functions/18_riemann_zeta/check_value.cc >compilation failed to produce executable >because: >/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: >In function 'void test(const testcase_riemann_zeta<Ret> (&)[Num], >Ret)': >/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >error: 'riemann_zeta' is not a member of 'std' >/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >note: suggested alternative: 'remainder' >compiler exited with status 1 The problem is that { dg-addition-options } was changed to dg-options, and so the first dg-options that enables the special functions is not used: --- a/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc +++ b/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc @@ -21,7 +21,7 @@ // riemann_zeta // This can take long on simulators, timing out the test. -// { dg-additional-options "-DMAX_ITERATIONS=5" { target simulator } } +// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-20 21:03 ` Jonathan Wakely @ 2017-11-20 21:10 ` Jonathan Wakely 2017-11-20 21:57 ` Jonathan Wakely 0 siblings, 1 reply; 13+ messages in thread From: Jonathan Wakely @ 2017-11-20 21:10 UTC (permalink / raw) To: Christophe Lyon Cc: David Edelsohn, Ed Smith-Rowland, libstdc++, gcc-patches, Jonathan Wakely, redi On 20/11/17 21:01 +0000, Jonathan Wakely wrote: >On 20/11/17 21:43 +0100, Christophe Lyon wrote: >>On 20 November 2017 at 17:02, David Edelsohn <dje.gcc@gmail.com> wrote: >>>This patch has introduced new regressions on at least PowerPC and AArch64. >>> >>>FAIL: ext/special_functions/hyperg/check_value.cc execution test >>>FAIL: tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc >>>execution test >>> >>>Thanks, David >> >>On AArch64 and ARM, I have also noticed >>FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors) >>UNRESOLVED: special_functions/18_riemann_zeta/check_value.cc >>compilation failed to produce executable >>because: >>/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: >>In function 'void test(const testcase_riemann_zeta<Ret> (&)[Num], >>Ret)': >>/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >>error: 'riemann_zeta' is not a member of 'std' >>/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >>note: suggested alternative: 'remainder' >>compiler exited with status 1 > >The problem is that { dg-addition-options } was changed to dg-options, >and so the first dg-options that enables the special functions is not >used: > >--- a/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc >+++ b/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc >@@ -21,7 +21,7 @@ >// riemann_zeta > >// This can take long on simulators, timing out the test. >-// { dg-additional-options "-DMAX_ITERATIONS=5" { target simulator } } >+// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } > I have a script to check dejagnu directives, and it says: testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc has multiple dg-options directives testsuite/ext/special_functions/airy_ai/check_nan.cc has dg-options after dg-add-options testsuite/ext/special_functions/hyperg/check_nan.cc has dg-options after dg-add-options testsuite/ext/special_functions/conf_hyperg/check_nan.cc has dg-options after dg-add-options testsuite/ext/special_functions/airy_bi/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/02_assoc_legendre/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/14_expint/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/12_ellint_2/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/09_cyl_bessel_k/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/21_sph_neumann/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/15_hermite/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/19_sph_bessel/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/05_comp_ellint_2/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/11_ellint_1/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/17_legendre/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/10_cyl_neumann/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/06_comp_ellint_3/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/06_comp_ellint_3/pr66689.cc has dg-options after dg-add-options testsuite/special_functions/01_assoc_laguerre/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/16_laguerre/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/13_ellint_3/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/13_ellint_3/pr66689.cc has dg-options after dg-add-options testsuite/special_functions/07_cyl_bessel_i/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/18_riemann_zeta/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/18_riemann_zeta/check_value.cc has multiple dg-options directives testsuite/special_functions/08_cyl_bessel_j/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/04_comp_ellint_1/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/03_beta/check_nan.cc has dg-options after dg-add-options testsuite/special_functions/20_sph_legendre/check_nan.cc has dg-options after dg-add-options For now I'll just fix the multiple dg-options one causing the FAILs. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-20 21:10 ` Jonathan Wakely @ 2017-11-20 21:57 ` Jonathan Wakely 2017-12-05 18:36 ` David Edelsohn 0 siblings, 1 reply; 13+ messages in thread From: Jonathan Wakely @ 2017-11-20 21:57 UTC (permalink / raw) To: Christophe Lyon Cc: David Edelsohn, Ed Smith-Rowland, libstdc++, gcc-patches, Jonathan Wakely, redi [-- Attachment #1: Type: text/plain, Size: 4704 bytes --] On 20/11/17 21:07 +0000, Jonathan Wakely wrote: >On 20/11/17 21:01 +0000, Jonathan Wakely wrote: >>On 20/11/17 21:43 +0100, Christophe Lyon wrote: >>>On 20 November 2017 at 17:02, David Edelsohn <dje.gcc@gmail.com> wrote: >>>>This patch has introduced new regressions on at least PowerPC and AArch64. >>>> >>>>FAIL: ext/special_functions/hyperg/check_value.cc execution test >>>>FAIL: tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc >>>>execution test >>>> >>>>Thanks, David >>> >>>On AArch64 and ARM, I have also noticed >>>FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors) >>>UNRESOLVED: special_functions/18_riemann_zeta/check_value.cc >>>compilation failed to produce executable >>>because: >>>/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: >>>In function 'void test(const testcase_riemann_zeta<Ret> (&)[Num], >>>Ret)': >>>/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >>>error: 'riemann_zeta' is not a member of 'std' >>>/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >>>note: suggested alternative: 'remainder' >>>compiler exited with status 1 >> >>The problem is that { dg-addition-options } was changed to dg-options, >>and so the first dg-options that enables the special functions is not >>used: >> >>--- a/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc >>+++ b/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc >>@@ -21,7 +21,7 @@ >>// riemann_zeta >> >>// This can take long on simulators, timing out the test. >>-// { dg-additional-options "-DMAX_ITERATIONS=5" { target simulator } } >>+// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } >> > > >I have a script to check dejagnu directives, and it says: > >testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc has multiple dg-options directives >testsuite/ext/special_functions/airy_ai/check_nan.cc has dg-options after dg-add-options >testsuite/ext/special_functions/hyperg/check_nan.cc has dg-options after dg-add-options >testsuite/ext/special_functions/conf_hyperg/check_nan.cc has dg-options after dg-add-options >testsuite/ext/special_functions/airy_bi/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/02_assoc_legendre/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/14_expint/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/12_ellint_2/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/09_cyl_bessel_k/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/21_sph_neumann/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/15_hermite/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/19_sph_bessel/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/05_comp_ellint_2/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/11_ellint_1/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/17_legendre/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/10_cyl_neumann/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/06_comp_ellint_3/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/06_comp_ellint_3/pr66689.cc has dg-options after dg-add-options >testsuite/special_functions/01_assoc_laguerre/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/16_laguerre/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/13_ellint_3/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/13_ellint_3/pr66689.cc has dg-options after dg-add-options >testsuite/special_functions/07_cyl_bessel_i/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/18_riemann_zeta/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/18_riemann_zeta/check_value.cc has multiple dg-options directives >testsuite/special_functions/08_cyl_bessel_j/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/04_comp_ellint_1/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/03_beta/check_nan.cc has dg-options after dg-add-options >testsuite/special_functions/20_sph_legendre/check_nan.cc has dg-options after dg-add-options > >For now I'll just fix the multiple dg-options one causing the FAILs. I've committed this patch, which should help for Christophe's cases. It won't help the AIX execution FAILs. [-- Attachment #2: patch.txt --] [-- Type: text/x-patch, Size: 2898 bytes --] commit 1d810d9fd1fbe11a144907a74686d0a03945a1a1 Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Nov 20 21:31:27 2017 +0000 Fix failing tests caused by duplicate dg-options * testsuite/special_functions/18_riemann_zeta/check_value.cc: Fix duplicate dg-options directive. * testsuite/tr1/5_numerical_facilities/special_functions/ 20_riemann_zeta/check_value_neg.cc: Likewise. diff --git a/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc b/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc index 8733531f8b2..48088653d16 100644 --- a/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc +++ b/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc @@ -21,7 +21,7 @@ // riemann_zeta // This can take long on simulators, timing out the test. -// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } +// { dg-additional-options "-DMAX_ITERATIONS=5" { target simulator } } #ifndef MAX_ITERATIONS #define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>)) @@ -111,15 +111,6 @@ data001[55] = { -4.4375384158955686, 0.80000000000000071, 0.0 }, }; const double toler001 = 2.5000000000000020e-13; -// riemann_zeta - -// This can take long on simulators, timing out the test. -// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } - -#ifndef MAX_ITERATIONS -#define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>)) -#endif - // Test data. // max(|f - f_Boost|): 8.8817841970012523e-16 at index 1 diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc index c8035a9c012..a693d394624 100644 --- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc +++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc @@ -21,7 +21,7 @@ // riemann_zeta // This can take long on simulators, timing out the test. -// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } +// { dg-additional-options "-DMAX_ITERATIONS=5" { target simulator } } #ifndef MAX_ITERATIONS #define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>)) @@ -111,15 +111,6 @@ data001[55] = { -4.4375384158955686, 0.80000000000000071, 0.0 }, }; const double toler001 = 2.5000000000000020e-13; -// riemann_zeta - -// This can take long on simulators, timing out the test. -// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } - -#ifndef MAX_ITERATIONS -#define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>)) -#endif - // Test data. // max(|f - f_Boost|): 8.8817841970012523e-16 at index 1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values 2017-11-20 21:57 ` Jonathan Wakely @ 2017-12-05 18:36 ` David Edelsohn 0 siblings, 0 replies; 13+ messages in thread From: David Edelsohn @ 2017-12-05 18:36 UTC (permalink / raw) To: Jonathan Wakely Cc: Christophe Lyon, Ed Smith-Rowland, libstdc++, gcc-patches, Jonathan Wakely, redi On Mon, Nov 20, 2017 at 4:51 PM, Jonathan Wakely <jwakely@redhat.com> wrote: > On 20/11/17 21:07 +0000, Jonathan Wakely wrote: >> >> On 20/11/17 21:01 +0000, Jonathan Wakely wrote: >>> >>> On 20/11/17 21:43 +0100, Christophe Lyon wrote: >>>> >>>> On 20 November 2017 at 17:02, David Edelsohn <dje.gcc@gmail.com> wrote: >>>>> >>>>> This patch has introduced new regressions on at least PowerPC and >>>>> AArch64. >>>>> >>>>> FAIL: ext/special_functions/hyperg/check_value.cc execution test >>>>> FAIL: >>>>> tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc >>>>> execution test >>>>> >>>>> Thanks, David >>>> >>>> >>>> On AArch64 and ARM, I have also noticed >>>> FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess >>>> errors) >>>> UNRESOLVED: special_functions/18_riemann_zeta/check_value.cc >>>> compilation failed to produce executable >>>> because: >>>> >>>> /libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: >>>> In function 'void test(const testcase_riemann_zeta<Ret> (&)[Num], >>>> Ret)': >>>> >>>> /libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >>>> error: 'riemann_zeta' is not a member of 'std' >>>> >>>> /libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:292: >>>> note: suggested alternative: 'remainder' >>>> compiler exited with status 1 >>> >>> >>> The problem is that { dg-addition-options } was changed to dg-options, >>> and so the first dg-options that enables the special functions is not >>> used: >>> >>> --- >>> a/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc >>> +++ >>> b/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc >>> @@ -21,7 +21,7 @@ >>> // riemann_zeta >>> >>> // This can take long on simulators, timing out the test. >>> -// { dg-additional-options "-DMAX_ITERATIONS=5" { target simulator } } >>> +// { dg-options "-DMAX_ITERATIONS=5" { target simulator } } >>> >> >> >> I have a script to check dejagnu directives, and it says: >> >> >> testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc >> has multiple dg-options directives >> testsuite/ext/special_functions/airy_ai/check_nan.cc has dg-options after >> dg-add-options >> testsuite/ext/special_functions/hyperg/check_nan.cc has dg-options after >> dg-add-options >> testsuite/ext/special_functions/conf_hyperg/check_nan.cc has dg-options >> after dg-add-options >> testsuite/ext/special_functions/airy_bi/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/02_assoc_legendre/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/14_expint/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/12_ellint_2/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/09_cyl_bessel_k/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/21_sph_neumann/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/15_hermite/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/19_sph_bessel/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/05_comp_ellint_2/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/11_ellint_1/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/17_legendre/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/10_cyl_neumann/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/06_comp_ellint_3/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/06_comp_ellint_3/pr66689.cc has dg-options >> after dg-add-options >> testsuite/special_functions/01_assoc_laguerre/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/16_laguerre/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/13_ellint_3/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/13_ellint_3/pr66689.cc has dg-options after >> dg-add-options >> testsuite/special_functions/07_cyl_bessel_i/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/18_riemann_zeta/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/18_riemann_zeta/check_value.cc has multiple >> dg-options directives >> testsuite/special_functions/08_cyl_bessel_j/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/04_comp_ellint_1/check_nan.cc has dg-options >> after dg-add-options >> testsuite/special_functions/03_beta/check_nan.cc has dg-options after >> dg-add-options >> testsuite/special_functions/20_sph_legendre/check_nan.cc has dg-options >> after dg-add-options >> >> For now I'll just fix the multiple dg-options one causing the FAILs. > > > > I've committed this patch, which should help for Christophe's cases. > It won't help the AIX execution FAILs. Ed, What is the progress with fixing the new execution fail regressinos that were introduced with the patch? Thanks, David ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-12-05 18:36 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-11-17 20:54 [PATCH libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values Ed Smith-Rowland 2017-11-17 21:24 ` Jonathan Wakely 2017-11-18 17:47 ` Ed Smith-Rowland 2017-11-20 17:04 ` Jonathan Wakely 2017-11-21 11:39 ` Florian Weimer 2017-11-21 13:51 ` Jonathan Wakely 2017-11-22 0:30 ` Joseph Myers 2017-11-20 16:31 David Edelsohn 2017-11-20 20:58 ` Christophe Lyon 2017-11-20 21:03 ` Jonathan Wakely 2017-11-20 21:10 ` Jonathan Wakely 2017-11-20 21:57 ` Jonathan Wakely 2017-12-05 18:36 ` David Edelsohn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).