This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38260] vector_size attribute vs specialization
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jun 2014 20:38:42 +0000
- Subject: [Bug c++/38260] vector_size attribute vs specialization
- Auto-submitted: auto-generated
- References: <bug-38260-4 at http dot gcc dot gnu dot org/bugzilla/>
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.