On Wed, Jan 24, 2018 at 05:08:10PM +0100, Richard Biener wrote:
> >The "omp declare simd" attribute refers to argument numbers of the
> >functions, so trying to apply it on versioned functions that can
> >perhaps
> >have different number and types of arguments results in ICEs or
> >wrong-code.
> >Unfortunately, if simd attribute or #pragma omp declare simd is used
> >on C++ ctors or dtors, those have DECL_ABSTRACT_ORIGIN of something
> >that
> >really doesn't exist, abstract ctor or dtor, so checking if
> >the types of node->decl and its DECL_ABSTRACT_ORIGIN are compatible
> >function
> >types doesn't work.
> 
> So if the attribute is on the decl we clone it should be in the list of 
> things that cloning adjusts or blocks cloning. 

Yeah, guess I could move the attribute removal code from omp-low.c to some
helper function and in tree_function_versioning check if the attribute is
present and if yes and the old/new function types don't match, drop the
attribute.  Or, add some flag to cgraph whether the attribute should be
honored or not, and clear it in tree_function_versioning and
omp_create_child_function instead of removing the attribute.

I'd prefer to defer that to GCC9 though at this point.

        Jakub

Reply via email to