This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: TR29124 C++ Special Maths - Make <math.h> pull functions into global namespace.
- From: Mike Stump <mikestump at comcast dot net>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: Ed Smith-Rowland <3dw4rd at verizon dot net>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Feb 2016 12:39:46 -0800
- Subject: Re: TR29124 C++ Special Maths - Make <math.h> pull functions into global namespace.
- Authentication-results: sourceware.org; auth=none
- References: <56A0349C dot 4090406 at verizon dot net> <20160121122912 dot GS15084 at redhat dot com> <56A172CE dot 7090408 at verizon dot net> <20160122103933 dot GE15084 at redhat dot com> <56A2B8F5 dot 8060505 at verizon dot net> <C6A55FEB-CA06-4BC5-97C9-B96706374670 at comcast dot net> <20160211115707 dot GP8441 at redhat dot com> <9DEAAB23-9B86-4DAF-99D8-13F22C3A3A1D at comcast dot net> <20160212180701 dot GI8441 at redhat dot com>
On Feb 12, 2016, at 10:07 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 12/02/16 09:52 -0800, Mike Stump wrote:
>> On Feb 11, 2016, at 3:57 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>>> On 10/02/16 22:36 -0800, Mike Stump wrote:
>>>> I’m seeing:
>>>>
>>>> /home/mrs/work1/gcc/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: In function 'void test(const testcase_riemann_zeta<Tp> (&)[Num], Tp)':
>>>> /home/mrs/work1/gcc/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:285:15: error: 'riemann_zeta' is not a member of 'std'
>>>> compiler exited with status 1
>>>> output is:
>>>> /home/mrs/work1/gcc/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc: In function 'void test(const testcase_riemann_zeta<Tp> (&)[Num], Tp)':
>>>> /home/mrs/work1/gcc/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:285:15: error: 'riemann_zeta' is not a member of 'std'
>>>>
>>>> FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors)
>>>> Excess errors:
>>>> /home/mrs/work1/gcc/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc:285:15: error: 'riemann_zeta' is not a member of 'std'
>>>>
>>>> UNRESOLVED: special_functions/18_riemann_zeta/check_value.cc compilation failed to produce executable
>>>> extra_tool_flags are:
>>>> -D__STDCPP_WANT_MATH_SPEC_FUNCS__
>>>>
>>>> on a recent trunk. This is a typical newlib port. Not sure if this is a real bug or not, but thought I’d forward it long.
>>>
>>> This confused me at first, but I think what must be happening is that
>>> your newlib port doesn't use c_model=c_global, so it uses a <cmath>
>>> header that doesn't #include <bits/spec_fun.h>.
>>
>>> What does your $target/libstdc++-v3/config.log show instead of
>>> c_global here?
>>
>> configure:16304: "C" header strategy set to c_global
>>
>> So, I don’t know of a better way to do this, other than just provide the .ii file. You can see what it was including, and where it didn’t include what you wanted. We can then go from there. I fear a longer series of 20 questions. The good news is that this is the _only_ recent failure.
>>
>> /home/mrs/work1/gcc-obj/./gcc/xg++ -shared-libgcc -B/home/mrs/work1/gcc-obj/./gcc -nostdinc++ -L/home/mrs/work1/gcc-obj/machine/libstdc++-v3/src -L/home/mrs/work1/gcc-obj/machine/libstdc++-v3/src/.libs -L/home/mrs/work1/gcc-obj/machine/libstdc++-v3/libsupc++/.libs -B/home/mrs/work1/install/machine/bin/ -B/home/mrs/work1/install/machine/lib/ -isystem /home/mrs/work1/install/machine/include -isystem /home/mrs/work1/install/machine/sys-include -B/home/mrs/work1/gcc-obj/machine/./libstdc++-v3/src/.libs -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -mno-oe -DLOCALEDIR="." -nostdinc++ -I/home/mrs/work1/gcc-obj/machine/libstdc++-v3/include/machine -I/home/mrs/work1/gcc-obj/machine/libstdc++-v3/include -I/home/mrs/work1/gcc/libstdc++-v3/libsupc++ -I/home/mrs/work1/gcc/libstdc++-v3/include/backward -I/home/mrs/work1/gcc/libstdc++-v3/testsuite/util /home/mrs/work1/gcc/libstdc++-v3/testsuite/special_functions/18_riemann_zeta/check_value.cc -DMAX_ITERATIONS=5 -fno-diagnostics-show-caret -fdiagnostics-color=never ./libtestc++.a -Wl,--gc-sections -L/home/mrs/work1/gcc-obj/machine/libstdc++-v3/src/filesystem/.libs -mno-oe -lm -o ./check_value.exe -E
>
> Thanks, the preprocessed file did help, because it showed that
> -D__STDCPP_WANT_MATH_SPEC_FUNCS__ was not being used, which is because
> we have this in the test:
>
> // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
> ...
> // { dg-options "-DMAX_ITERATIONS=5" { target simulator } }
> Should the dg-options directive for simulators be using
> dg-additional-options instead?
I think that’s a good call. Testing it out:
Old tests that failed, that have disappeared: (Eeek!)
: special_functions/18_riemann_zeta/check_value.cc (test for excess errors)
Ok?
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 d6b3171..f84edd8 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
@@ -20,7 +20,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>))
@@ -109,9 +109,6 @@ data001[55] =
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