[PATCH] libstdc++ testsuite, silence a FreeBSD libm warning

Andreas Tobler andreast-list@fgznet.ch
Mon Sep 30 19:22:00 GMT 2019


On 30.09.19 19:09, Andreas Tobler wrote:
> Hi all,
> 
> the attached patch tries to silence a warning from the msun of FreeBSD.
> When compiling the special_functions testcases, I get excess errors
> because of this warning:
> 
> warning: tgammal has lower than advertised precision
> 
> With the patch, all special_functions test cases pass now.
> 
> What do you think?

I learned from the c-side, a patch to prune.exp might be too expensive 
if I only have a couple of test cases involved.

Here the version which only touches the affected test cases.

Which one do you prefer?

TIA,
Andreas

2019-09-30  Andreas Tobler  <andreast@gcc.gnu.org>

	* testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
	FreeBSD warning about lower advertised precision of tgammal.
	* testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
	* testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
	* testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
	* testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
	* testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
	* testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	08_cyl_bessel_i/check_nan.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	09_cyl_bessel_j/check_nan.cc: Likewise.
	* testuite/tr1/5_numerical_facilities/special_functions/
	10_cyl_bessel_k/check_nan.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	11_cyl_neumann/check_nan.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	21_sph_bessel/check_nan.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	23_sph_neumann/check_nan.cc: Likewise.
-------------- next part --------------
Index: ext/special_functions/airy_ai/check_nan.cc
===================================================================
--- ext/special_functions/airy_ai/check_nan.cc	(revision 276292)
+++ ext/special_functions/airy_ai/check_nan.cc	(working copy)
@@ -3,6 +3,7 @@
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
 // { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: ext/special_functions/airy_bi/check_nan.cc
===================================================================
--- ext/special_functions/airy_bi/check_nan.cc	(revision 276292)
+++ ext/special_functions/airy_bi/check_nan.cc	(working copy)
@@ -3,6 +3,7 @@
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
 // { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: special_functions/07_cyl_bessel_i/check_nan.cc
===================================================================
--- special_functions/07_cyl_bessel_i/check_nan.cc	(revision 276292)
+++ special_functions/07_cyl_bessel_i/check_nan.cc	(working copy)
@@ -2,6 +2,7 @@
 // { dg-require-c-std "" }
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: special_functions/08_cyl_bessel_j/check_nan.cc
===================================================================
--- special_functions/08_cyl_bessel_j/check_nan.cc	(revision 276292)
+++ special_functions/08_cyl_bessel_j/check_nan.cc	(working copy)
@@ -2,6 +2,7 @@
 // { dg-require-c-std "" }
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: special_functions/09_cyl_bessel_k/check_nan.cc
===================================================================
--- special_functions/09_cyl_bessel_k/check_nan.cc	(revision 276292)
+++ special_functions/09_cyl_bessel_k/check_nan.cc	(working copy)
@@ -2,6 +2,7 @@
 // { dg-require-c-std "" }
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: special_functions/10_cyl_neumann/check_nan.cc
===================================================================
--- special_functions/10_cyl_neumann/check_nan.cc	(revision 276292)
+++ special_functions/10_cyl_neumann/check_nan.cc	(working copy)
@@ -2,6 +2,7 @@
 // { dg-require-c-std "" }
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: special_functions/19_sph_bessel/check_nan.cc
===================================================================
--- special_functions/19_sph_bessel/check_nan.cc	(revision 276292)
+++ special_functions/19_sph_bessel/check_nan.cc	(working copy)
@@ -2,6 +2,7 @@
 // { dg-require-c-std "" }
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: special_functions/21_sph_neumann/check_nan.cc
===================================================================
--- special_functions/21_sph_neumann/check_nan.cc	(revision 276292)
+++ special_functions/21_sph_neumann/check_nan.cc	(working copy)
@@ -2,6 +2,7 @@
 // { dg-require-c-std "" }
 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // Copyright (C) 2016-2019 Free Software Foundation, Inc.
 //
Index: tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc
===================================================================
--- tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc	(revision 276292)
+++ tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-c-std "" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // 2007-01-10  Edward Smith-Rowland <3dw4rd@verizon.net>
 //
Index: tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc
===================================================================
--- tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc	(revision 276292)
+++ tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-c-std "" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // 2007-01-10  Edward Smith-Rowland <3dw4rd@verizon.net>
 //
Index: tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc
===================================================================
--- tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc	(revision 276292)
+++ tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-c-std "" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // 2007-01-10  Edward Smith-Rowland <3dw4rd@verizon.net>
 //
Index: tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc
===================================================================
--- tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc	(revision 276292)
+++ tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-c-std "" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // 2007-01-10  Edward Smith-Rowland <3dw4rd@verizon.net>
 //
Index: tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc
===================================================================
--- tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc	(revision 276292)
+++ tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-c-std "" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // 2007-01-10  Edward Smith-Rowland <3dw4rd@verizon.net>
 //
Index: tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc
===================================================================
--- tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc	(revision 276292)
+++ tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-c-std "" }
 // { dg-add-options ieee }
+// { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
 
 // 2007-01-10  Edward Smith-Rowland <3dw4rd@verizon.net>
 //


More information about the Gcc-patches mailing list