https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38260

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot com

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Putting a break point in determine_specialization reveals that the attribute on
the return type gets lost, and post parser the code is essentially equivalent
to:

template< class T > T Abs(T);
template<> float Abs(__vector(4) float);

which of course cannot work. Indeed, for obvious reasons, both:

#define vf4 __attribute__((vector_size(16) )) float
template< class T > T Abs();
template<> vf4 Abs();

and

#define vf4 __attribute__((vector_size(16) )) float
template< class T > void Abs(T);
template<> void Abs(vf4);

are accepted.

Reply via email to