On Mon, Aug 25, 2025 at 10:23:52AM -0600, Sandra Loosemore wrote:
> On 8/25/25 09:29, Jakub Jelinek wrote:
> > On Mon, Aug 25, 2025 at 09:13:58AM -0600, Sandra Loosemore wrote:
> > > How?  Declare variant substitution presently happens primarily during
> > > gimplification which is way before any vectorization happens.  And fixing
> > > the various bugs esp in the C++ front end with regard to doing the name
> > > lookup/template expansion/overload resolution using the actual arguments 
> > > at
> > > the call site will move the generation of the call_expr to the variant 
> > > even
> > 
> > That is not what should be done.  The lookup should be done at the declare
> > variant declaration side, that is how the design has been since that
> > meeting.  The compiler records the variants and later on just picks from
> > that list of variants based on the condition.
> 
> Starting with OpenMP 5.2, the spec explicitly says differently for C++:
> 
> "The function variant is determined by base language standard name lookup
> rules ([basic.lookup]) of variant-name using the argument types at the call
> site..."

I think https://github.com/OpenMP/spec/issues/1852 should be reopened for
that, that call site part is an error.

        Jakub

Reply via email to