This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38260] vector_size attribute vs specialization


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]