On 1/2/19 1:41 PM, Rainer Orth wrote: > Hi Martin, > >> The PR is about a function (__tls_init) that ends before it begins >> (from line point of view). The patch uses location of a variable where >> we first create the function declaration. I'm not much familiar with C++ FE, >> but it works. >> >> Survives bootstrap and regression test on ppc64le-linux-gnu. >> >> Ready for trunk? >> Thanks, >> Martin >> >> gcc/cp/ChangeLog: >> >> 2018-11-30 Martin Liska <mli...@suse.cz> >> >> PR c++/88263 >> * decl2.c (get_local_tls_init_fn): Add location_t argument and >> use it. >> (get_tls_init_fn): Call it with location of variable for which >> we'll need to create tls_init function. >> (handle_tls_init): Likewise. >> >> gcc/testsuite/ChangeLog: >> >> 2018-11-30 Martin Liska <mli...@suse.cz> >> >> * g++.dg/gcov/pr88263.C: New test. > > the new testcase FAILs on Solaris: > > +FAIL: g++.dg/gcov/pr88263.C (test for excess errors) > > Excess errors: > /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/gcov/pr88263.C:7:11: error: > 'namespace log { }' conflicts with a previous declaration > /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/gcov/pr88263.C:19:11: error: > 'namespace log { }' conflicts with a previous declaration > /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/gcov/pr88263.C:21:33: error: > 'Logstream' has not been declared > > /var/gcc/regression/trunk/11.5-gcc/build/gcc/include-fixed/iso/math_iso.h:69:15: > note: previous declaration 'namespace std { }::log' > > +UNRESOLVED: g++.dg/gcov/pr88263.C compilation failed to produce executable > +FAIL: g++.dg/gcov/pr88263.C gcov failed: pr88263.C.gcov does not exist > > <iso/math_iso.h> has > > namespace std { > extern double log __P((double)); > extern "C++" { > inline float log(float __X) { return __logf(__X); } > inline long double log(long double __X) { return __logl(__X); } > } > } > > Fixed by renaming namespace log to logging to avoid the clash. Tested > on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. > Installed no mainline.
Thanks for the patch. Martin > > Rainer >