From patchwork Wed Apr 19 14:00:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 752302 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7Nvg3ms5z9ryv for ; Thu, 20 Apr 2017 00:01:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="oS160a0f"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=cwTJMDplkQxHAZR5fn9C7b7Rp1FJB 9tY8PGUlEcz+4TFccG2j/auFMpn9tBCA3eNOSPuSFiXmNowe7Hyg3mdQ2rGh0l80 89dPsIKYYenURyL80g+AHR/fkWRcUWePQ76fYz7zox9uR18tUuCUXiP3qprFpmhQ Jlt+BYBoVCZSMg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=t283EuM/gcbUR00cu7Lm1yJL3kc=; b=oS1 60a0fiOI3sNPzJOY/HoKjsp6u/c4xo7Ht+Ognq5ZbqJHWKJmn89zHSR30uYnpdMt PBeebm6Q9VIjPz7NRzBqcLEIdS8nwI13COa+fzYjx6RjXS4HI3zQxNAN298Wq14H vMc2nec0xDz0D1FDY1A8dWMAnTsjPe3o8yA4oOpA= Received: (qmail 22061 invoked by alias); 19 Apr 2017 14:01:07 -0000 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 Received: (qmail 21992 invoked by uid 89); 19 Apr 2017 14:01:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HTo:U*ro, HTo:D*comcast.net, 50000000000 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 14:01:03 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E193361E78; Wed, 19 Apr 2017 14:01:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E193361E78 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E193361E78 Received: from tucnak.zalov.cz (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CCB681B58; Wed, 19 Apr 2017 14:01:03 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v3JE0xLc007625; Wed, 19 Apr 2017 16:01:00 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v3JE0v1M007624; Wed, 19 Apr 2017 16:00:57 +0200 Date: Wed, 19 Apr 2017 16:00:57 +0200 From: Jakub Jelinek To: Rainer Orth , Mike Stump Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Adjust c-c++-common/opaque-vector.c testcase (PR c++/80459) Message-ID: <20170419140057.GH1809@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes Hi! The testcase attempts to use long double __attribute__((vector_size (16))) vector and in addition to that uses __typeof((v PR c++/80459 * c-c++-common/opaque-vector.c (SIZEOF_MAXINT): Define. (f): Don't test long double vectors if __SIZEOF_LONG_DOUBLE__ is not power of 2, or is more than 16 or more than SIZEOF_MAXINT. Jakub --- gcc/testsuite/c-c++-common/opaque-vector.c.jj 2013-10-21 09:00:50.000000000 +0200 +++ gcc/testsuite/c-c++-common/opaque-vector.c 2017-04-19 10:24:19.154548627 +0200 @@ -5,6 +5,11 @@ #define T_TEST(TYPE) #endif #define T(TYPE) B_TEST(TYPE) T_TEST(TYPE) +#ifdef __SIZEOF_INT128__ +#define SIZEOF_MAXINT __SIZEOF_INT128__ +#else +#define SIZEOF_MAXINT __SIZEOF_LONG_LONG__ +#endif void f () { @@ -15,8 +20,13 @@ void f () T_TEST(float) T_TEST(double) - /* Avoid trouble with non-power-of-two sizes. */ -#if !defined(__i386__) && !defined(__x86_64__) && !defined(__m68k__) && !defined(__ia64__) && !defined(__hppa__) + /* Avoid trouble with non-power-of-two sizes. + Also avoid trouble with long double larger than integral types. */ +#if !defined(__i386__) && !defined(__x86_64__) && !defined(__m68k__) \ + && !defined(__ia64__) && !defined(__hppa__) \ + && (__SIZEOF_LONG_DOUBLE__ & (__SIZEOF_LONG_DOUBLE__ - 1)) == 0 \ + && __SIZEOF_LONG_DOUBLE__ <= 16 \ + && __SIZEOF_LONG_DOUBLE__ <= SIZEOF_MAXINT T_TEST(long double) #endif }