From patchwork Thu Sep 20 20:01:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Glisse X-Patchwork-Id: 185468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 4E3EA2C0091 for ; Fri, 21 Sep 2012 06:01:24 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348776084; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=wWpd13bzSOB58N7OS5FM19JhvRg=; b=oTPomgevqF0y0nO 0FZxJ+0uMLzrTDBSlZeHwTlX9fmcW0uSRr3kgil6DY/20VTYXxF91oLE+vH68QL7 g5hYKsG6fMQTQ+kku6YAh/c6fN6kf1Z5wuarn0eOeW0A7mS7RJPdogOyzDEQAy+V T2OoU4eoevRn5m0mey3zSCR4KBhE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=ZHf3bKOXkyWR0IVccDqwuZchvPfagC9r1a3iqno3QjwZdnQ7apM6o0WrNM3Yk4 Q8WzDl8Dt0iFr7u9Wp7tvw1lHeBoaecRZsVfysW0eeq0IHLxUgmEFAxaYqL84ae2 BAAQ3h0++tuMgIIm/wiqk5XMw76NFZP/9kc/DceNhewq0=; Received: (qmail 2878 invoked by alias); 20 Sep 2012 20:01:20 -0000 Received: (qmail 2869 invoked by uid 22791); 20 Sep 2012 20:01:19 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail4-relais-sop.national.inria.fr (HELO mail4-relais-sop.national.inria.fr) (192.134.164.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Sep 2012 20:01:02 +0000 Received: from stedding.saclay.inria.fr ([193.55.250.194]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 20 Sep 2012 22:01:00 +0200 Received: from glisse (helo=localhost) by stedding.saclay.inria.fr with local-esmtp (Exim 4.80) (envelope-from ) id 1TEmvk-00062s-KL; Thu, 20 Sep 2012 22:01:00 +0200 Date: Thu, 20 Sep 2012 22:01:00 +0200 (CEST) From: Marc Glisse To: gcc-patches@gcc.gnu.org cc: jason@redhat.com Subject: Re: vector comparisons in C++ In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sat, 1 Sep 2012, Marc Glisse wrote: > I have some issues with the vector-compare-2.c torture test. It passes a > vector by value (argument and return type), which is likely to warn (although > for some reason it doesn't for me, with today's compiler). And it takes > -Wno-psabi through a .x file, but those are not read in c-c++-common, so I > put it in dg-options. I would have changed the function to use pointers, but > I don't know if it specifically wants to test passing by value... Hello, Pat Haugen just explained it to me: there was a default -w option in the old location of the testcase. However, there isn't in the new one. I am thus proposing the following, which restores the old behavior. Note that -Wno-psabi is still needed as it is not implied by -w. 2012-09-20 Marc Glisse PR c++/54427 * c-c++-common/torture/vector-compare-2.c: Add -w. Index: c-c++-common/torture/vector-compare-2.c =================================================================== --- c-c++-common/torture/vector-compare-2.c (revision 191585) +++ c-c++-common/torture/vector-compare-2.c (working copy) @@ -1,12 +1,12 @@ /* { dg-do run } */ -/* { dg-options "-Wno-psabi" } */ +/* { dg-options "-Wno-psabi -w" } */ #define vector(elcount, type) \ __attribute__((vector_size((elcount)*sizeof(type)))) type /* Check that constant folding in these simple cases works. */ vector (4, int) foo (vector (4, int) x) { return (x == x) + (x != x) + (x > x) + (x < x) + (x >= x) + (x <= x);