public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Marc Glisse <marc.glisse@inria.fr>
Cc: Jason Merrill <jason@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [C++] Fix __builtin_shuffle
Date: Fri, 28 Jun 2013 06:20:00 -0000	[thread overview]
Message-ID: <20130628060050.GI2336@tucnak.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1306271344370.26429@stedding.saclay.inria.fr>

Hi!

On Thu, Jun 27, 2013 at 01:59:37PM +0200, Marc Glisse wrote:
> --- testsuite/g++.dg/ext/pr57509.C	(revision 0)
> +++ testsuite/g++.dg/ext/pr57509.C	(revision 0)
> @@ -0,0 +1,16 @@
> +/* { dg-do compile } */
> +/* { dg-options "-std=c++11" } */
> +
> +template <bool> struct enable_if {};
> +template <> struct enable_if<true> {typedef void type;};
> +template <class T> void f (T& v) { v = __builtin_shuffle (v, v); }
> +template <class T> void g (T) {}
> +template <class T> auto g (T x) -> typename enable_if<sizeof(__builtin_shuffle(x,x))!=2>::type {}
> +typedef int v4i __attribute__((vector_size(4*sizeof(int))));
> +typedef float v4f __attribute__((vector_size(4*sizeof(float))));
> +int main(){
> +  v4i a = {1,2,3,0};
> +  f(a);
> +  v4f b = {1,2,3,0};
> +  g(b);
> +}

Note this testcase fails on i686-linux:
/usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C: In function 'int main()':
/usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C:15:7: warning: SSE vector argument without SSE enabled changes the ABI [enabled by default]
/usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C:15:7: warning: SSE vector argument without SSE enabled changes the ABI [enabled by default]
/usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C:15:7: note: The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6

The note is actually pruned, but the warnings aren't.  -Wno-abi -Wno-psabi
doesn't help, but -w does, so I'd suggest just to add -w to dg-options.

	Jakub

  parent reply	other threads:[~2013-06-28  6:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 11:09 Marc Glisse
2013-06-26 14:20 ` Marc Glisse
2013-06-26 20:56 ` Jason Merrill
2013-06-27 11:59   ` Marc Glisse
2013-06-27 12:27     ` Jason Merrill
2013-06-27 15:29       ` Marc Glisse
2013-06-27 15:40         ` Jakub Jelinek
2013-06-27 15:55           ` Marc Glisse
2013-06-27 16:09             ` Jakub Jelinek
2013-06-27 16:10               ` Marc Glisse
2013-06-27 21:58                 ` Marc Glisse
2013-06-28  6:20     ` Jakub Jelinek [this message]
2013-06-28  8:48       ` Marc Glisse
2013-06-28 10:34         ` Marc Glisse

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=20130628060050.GI2336@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=marc.glisse@inria.fr \
    /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).