public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/38260] vector_size attribute vs specialization
Date: Wed, 11 Jun 2014 20:38:00 -0000	[thread overview]
Message-ID: <bug-38260-4-NNgDuOR28a@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-38260-4@http.gcc.gnu.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.


  parent reply	other threads:[~2014-06-11 20:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-38260-4@http.gcc.gnu.org/bugzilla/>
2012-01-28  9:21 ` pinskia at gcc dot gnu.org
2012-10-15 11:22 ` paolo.carlini at oracle dot com
2012-10-15 12:59 ` glisse at gcc dot gnu.org
2012-10-15 13:55 ` paolo.carlini at oracle dot com
2014-06-11 20:38 ` paolo.carlini at oracle dot com [this message]
2014-06-11 23:47 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-38260-4-NNgDuOR28a@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).