This is the mail archive of the gcc-patches@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: TR29124 C++ Special Maths - Make <math.h> pull functions into global namespace.


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 } }

So on a simulator we *only* get the MAX_ITERATIONS macro, and not the
__STDCPP_WANT_MATH_SPEC_FUNCS__ one which is needed for the test to
compile (I was misled by the "extra_tool_flags are:" above which
suggested that was set, so I didn't even consider it wasn't!)

Should the dg-options directive for simulators be using
dg-additional-options instead?



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