Ok, push done.
Even after full rebuild those tests are still UNRESOLVED on my system.
Yes, I also noticed that I could remove this check. I'll propose it later.
François
On 02/06/2023 09:43, Jonathan Wakely wrote:
On Fri, 2 Jun 2023 at 08:33, François Dumont wrote:
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>.
This fixes the broken parallel mode.
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 ?
Please just add the #include to parallel/algobase.h for now.
The effective-target keyword seems reasonable, but "omp" is not a good
name. And if we add that dg-require-effective-target to those tests
then they don't need to repeat the check in the test itself:
#if __has_include(<omp.h>)
So please just add the #include and then we can revisit the
effective-target separately.
On 01/06/2023 23:57, Jonathan Wakely wrote:
On Thu, 1 Jun 2023, 21:37 François Dumont via Libstdc++,
<libstd...@gcc.gnu.org <mailto:libstdc%2b...@gcc.gnu.org>> wrote:
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 don't know what you mean, because GCC doesn't depend on "OMP". GCC
includes its own OpenMP implementation, and installs its own libgomp
runtime library to support the -fopenmp flag. It doesn't depend on
anything else.
Which OS are you testing on?