public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
	Rainer Orth <ro@cebitec.uni-bielefeld.de>,
	 Jonathan Wakely via Gcc-patches <gcc-patches@gcc.gnu.org>,
	"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] Move std::search into algobase.h
Date: Fri, 2 Jun 2023 08:43:35 +0100	[thread overview]
Message-ID: <CACb0b4mDQ_RUTuo2v+bkKB31b=Hp2=jGX752d3MrFsUV1_DuUg@mail.gmail.com> (raw)
In-Reply-To: <8f43b613-f185-8e46-8fc6-02bc286125b5@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

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++, <
> libstdc++@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?

  reply	other threads:[~2023-06-02  7:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 17:39 François Dumont
2023-05-31 17:55 ` Jonathan Wakely
2023-06-01 11:52   ` Rainer Orth
2023-06-01 12:05     ` Jonathan Wakely
2023-06-01 13:50       ` François Dumont
2023-06-01 20:36       ` François Dumont
2023-06-01 21:57         ` Jonathan Wakely
2023-06-02  7:33           ` François Dumont
2023-06-02  7:43             ` Jonathan Wakely [this message]
2023-06-02  9:47               ` François Dumont
2023-06-02 11:30                 ` Jonathan Wakely
2023-06-02 12:34                   ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACb0b4mDQ_RUTuo2v+bkKB31b=Hp2=jGX752d3MrFsUV1_DuUg@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ro@cebitec.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).