From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12288 invoked by alias); 28 Jun 2013 06:01:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 12255 invoked by uid 89); 28 Jun 2013 06:00:56 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 28 Jun 2013 06:00:55 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5S60sgX027873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Jun 2013 02:00:54 -0400 Received: from zalov.cz (vpn1-7-18.ams2.redhat.com [10.36.7.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5S60pTv010770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Jun 2013 02:00:53 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r5S60pio007371; Fri, 28 Jun 2013 08:00:51 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r5S60oU8007370; Fri, 28 Jun 2013 08:00:50 +0200 Date: Fri, 28 Jun 2013 06:20:00 -0000 From: Jakub Jelinek To: Marc Glisse Cc: Jason Merrill , gcc-patches@gcc.gnu.org Subject: Re: [C++] Fix __builtin_shuffle Message-ID: <20130628060050.GI2336@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <51CB558B.6090905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-06/txt/msg01574.txt.bz2 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 struct enable_if {}; > +template <> struct enable_if {typedef void type;}; > +template void f (T& v) { v = __builtin_shuffle (v, v); } > +template void g (T) {} > +template auto g (T x) -> typename enable_if::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