[PATCH] Move std::search into algobase.h

François Dumont frs.dumont@gmail.com
Fri Jun 2 07:33:32 GMT 2023


I haven't been able to reproduce so far.

Here is however a patch that I think will fix the problem. At least 
failing tests are UNRESOLVED on my system.

     libstdc++: Fix broken _GLIBCXX_PARALLEL mode

     Add missing <parallel/search.h> include in <parallel/algobase.h>.

     Detect availability of <omp.h> in tests needing it to make them 
UNSUPPORTED
     rather than PASS when header is missing.

     libstdc++-v3/ChangeLog:

             * include/parallel/algobase.h: Include <parallel/search.h>.
             * testsuite/lib/libstdc++.exp (check_effective_target_omp): 
New.
             * testsuite/17_intro/headers/c++2011/parallel_mode.cc:
             Add { dg-require-effective-target omp }.
             * testsuite/17_intro/headers/c++2014/parallel_mode.cc: 
Likewise.
             * testsuite/17_intro/headers/c++2017/parallel_mode.cc: 
Likewise.

Ok to commit ?


On 01/06/2023 23:57, Jonathan Wakely wrote:
>
>
> On Thu, 1 Jun 2023, 21:37 François Dumont via Libstdc++, 
> <libstdc++@gcc.gnu.org <mailto:libstdc%2B%2B@gcc.gnu.org>> wrote:
>
>     It's of course not as easy as I thought.
>
>     I would never have detected this problem on my system because I'm
>     missing omp.h.
>
>     I've implemented and added a:
>
>     // { dg-require-effective-target omp }
>
>     so that now those tests are UNRESOLVED rather than PASS.
>
>     Now I've install OMP and try to rebuild lib to reproduce the failure.
>
>
> You shouldn't need to install anything, just build gcc and don't 
> configure it with --disable-libgomp
>
I haven't used --disable-libgomp. But maybe when I run configure the 1st 
time it tried to detect OMP install and failed to find it as I just 
installed it.

I'll tried to rebuild everything to see if I can eventually have those 
tests PASS.

François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallel_mode.patch
Type: text/x-patch
Size: 2657 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20230602/85b7185c/attachment.bin>


More information about the Libstdc++ mailing list