On Wed, Sep 16, 2020 at 08:00:01AM -0400, Nathan Sidwell wrote:
> is libgomp/testsuite/libgomp.c++/udr-3.C well formed?
> 
> Specifically V<T,D>::baz?
> 
> If you remove the templatedness and plug in typedefs for T & D on its only
> instantiation (as the attached does), you get the following errors:
> 
> devvm293:414>g++ -std=c++11 -c -fopenmp udr-3.C
> udr-3.C: In member function 'void V::baz()':
> udr-3.C:112:27: error: no matching function for call to 'W::W(int)'
>   112 |  initializer (omp_priv (12))
>       |                           ^

I guess you're right that W::W(int) should be defined.
And the question is why it isn't diagnosed during instantiation, sure.

The initialized (omp_priv (12))
etc. clause means that for the type(s) for which the declare reduction
is defined, when omp-low.c privatizes the variable, it should be done
as if the source contained W var (12);
This is done by attaching code to call the right ctors/dtors to the clauses
and omp-low.c emitting those sequences.

        Jakub

  • openmp question Nathan Sidwell
    • Re: openmp question Jakub Jelinek via Gcc-patches

Reply via email to