From patchwork Thu Dec 22 12:47:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 708219 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 3tkrs16vVwz9vHD for ; Thu, 22 Dec 2016 23:47:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="aOFJg9km"; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=kF30gBPRXAT/AB9u/wYJxXW27qIx8mW7BhEvxBxPhv+W4orZ/W 8Z73F0ezUyK6O75Jq+tng25qDdT5TmHjBkDjGA2jAcoZjqWOI5Az9eakUpjhuX76 RtMmQCBtwKRqFEmp9FXiHZ/Ycw1YFOvtlaP8v2RJ7XmOU0b1btbUf0E1Q= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=iyDTAsgezNh1bZwwQNfx1agDrLA=; b=aOFJg9kmGwrY4VrPLG/2 WCVpbb1pVL4FAG8NltPeOVVgi6B2OyIfdVIXF+XjqxeZXeATJEpapaaSbbnBiu/N OHl47yVMU8kphOhM09l+a7Wua+UoI0JJPL2e2SUZLs6R8QMMrDqIidGzkwDihlhZ I5h8pRS6rqOQC4iY+NsJI9I= Received: (qmail 98862 invoked by alias); 22 Dec 2016 12:47:20 -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 97795 invoked by uid 89); 22 Dec 2016 12:47:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=beta, sk:dgrequ, sk:dg-requ, toto X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.216) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Dec 2016 12:47:09 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwTPLBCxG2PQt7BpWLF2I= X-RZG-CLASS-ID: mo00 Received: from [192.168.0.123] (ip5f5871bb.dynamic.kabel-deutschland.de [95.88.113.187]) by smtp.strato.de (RZmta 39.11 DYNA|AUTH) with ESMTPSA id K09e94sBMCl6ax3 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Thu, 22 Dec 2016 13:47:06 +0100 (CET) To: gcc-patches From: Georg-Johann Lay Subject: [testsuite, patch, committed] ad PR52641: More case for int32plus, size32plus, etc. Message-ID: <1aa043cf-aa87-25e5-5739-5f5644022cd3@gjlay.de> Date: Thu, 22 Dec 2016 13:47:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-IsSubscribed: yes http://gcc.gnu.org/r243885 Committed this addition of restrictions, mostly for 16-bit int or 16-bit size targtes. Johann gcc/testsuite/ PR testsuite/52641 * gcc.dg/pr35258.c (main) : Use an integer value that has at least a size of 4. * gcc.dg/Walloca-1.c (foo1): Use alloca with 30000 (instead of 90000). * gcc.dg/graphite/pr46185.c: Require int32plus, size32plus. * gcc.dg/graphite/isl-ast-op-select.c: Same. * gcc.dg/graphite/pr42205-1.c: Require int32plus. * gcc.dg/graphite/pr42221.c: Same. * gcc.dg/tree-ssa/pr65136.c: Same. * gcc.dg/tree-ssa/sra-20.c: Same. * gcc.dg/graphite/scop-0.c: Require size32plus. * gcc.dg/graphite/scop-22.c: Same. * gcc.dg/graphite/scop-3.c: Same. * gcc.dg/graphite/scop-dsyr2k.c: Same. * gcc.dg/graphite/scop-dsyrk.c: Same. * gcc.dg/graphite/scop-mvt.c: Same. * gcc.dg/graphite/scop-sor.c: Same. * gcc.dg/tree-ssa/pr68529-3.c: Same. * gcc.dg/tree-ssa/pr66449.c [long != pointer]: Use intptr_t if. * gcc.dg/tree-ssa/pr70919.c [int <= 2]: Use 32-bit int as needed. * gcc.dg/tree-ssa/pr71408.c: Same. * gcc.dg/tree-ssa/ssa-dom-thread-8.c (f2) [long != pointer]: Use uintptr_t instead of long for int representation of address. * gcc.dg/tree-ssa/tailcall-7-run.c: Require trampolines. Index: gcc.dg/Walloca-1.c =================================================================== --- gcc.dg/Walloca-1.c (revision 243884) +++ gcc.dg/Walloca-1.c (working copy) @@ -27,7 +27,7 @@ void foo1 (size_t len, size_t len2, size // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 26 } useit (s); - s = alloca(90000); /* { dg-warning "is too large" } */ + s = alloca (30000); /* { dg-warning "is too large" } */ useit (s); if (len < 2000) Index: gcc.dg/graphite/isl-ast-op-select.c =================================================================== --- gcc.dg/graphite/isl-ast-op-select.c (revision 243884) +++ gcc.dg/graphite/isl-ast-op-select.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-require-effective-target size32plus } */ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-O2 -floop-nest-optimize" } */ static void kernel_gemm(int ni, int nj, int nk, double alpha, double beta, double C[1024][1024], double A[1024][1024], double B[1024][1024]) Index: gcc.dg/graphite/pr42205-1.c =================================================================== --- gcc.dg/graphite/pr42205-1.c (revision 243884) +++ gcc.dg/graphite/pr42205-1.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-O1 -ffast-math -floop-interchange" } */ int adler32(int adler, char *buf, int n) Index: gcc.dg/graphite/pr42221.c =================================================================== --- gcc.dg/graphite/pr42221.c (revision 243884) +++ gcc.dg/graphite/pr42221.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-Os -fgraphite-identity" } */ static void b2w(unsigned int *out, const unsigned char *in, unsigned int len) Index: gcc.dg/graphite/pr46185.c =================================================================== --- gcc.dg/graphite/pr46185.c (revision 243884) +++ gcc.dg/graphite/pr46185.c (working copy) @@ -1,4 +1,6 @@ /* { dg-do run } */ +/* { dg-require-effective-target size32plus } */ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-O2 -floop-interchange -ffast-math -fno-ipa-cp" } */ #define DEBUG 0 Index: gcc.dg/graphite/scop-0.c =================================================================== --- gcc.dg/graphite/scop-0.c (revision 243884) +++ gcc.dg/graphite/scop-0.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ int foo (void); void bar (void); Index: gcc.dg/graphite/scop-22.c =================================================================== --- gcc.dg/graphite/scop-22.c (revision 243884) +++ gcc.dg/graphite/scop-22.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ double u[1782225]; void foo(int N, int *res) Index: gcc.dg/graphite/scop-3.c =================================================================== --- gcc.dg/graphite/scop-3.c (revision 243884) +++ gcc.dg/graphite/scop-3.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ int toto() { int i, j, k; Index: gcc.dg/graphite/scop-dsyr2k.c =================================================================== --- gcc.dg/graphite/scop-dsyr2k.c (revision 243884) +++ gcc.dg/graphite/scop-dsyr2k.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define NMAX 3000 static double a[NMAX][NMAX], b[NMAX][NMAX], c[NMAX][NMAX]; Index: gcc.dg/graphite/scop-dsyrk.c =================================================================== --- gcc.dg/graphite/scop-dsyrk.c (revision 243884) +++ gcc.dg/graphite/scop-dsyrk.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define NMAX 3000 #define MEASURE_TIME 1 Index: gcc.dg/graphite/scop-mvt.c =================================================================== --- gcc.dg/graphite/scop-mvt.c (revision 243884) +++ gcc.dg/graphite/scop-mvt.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define NMAX 2000 static double x1[NMAX], x2[NMAX], a[NMAX][NMAX], y_1[NMAX], y_2[NMAX]; Index: gcc.dg/graphite/scop-sor.c =================================================================== --- gcc.dg/graphite/scop-sor.c (revision 243884) +++ gcc.dg/graphite/scop-sor.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define SIZE 10000 static double P[SIZE][SIZE]; Index: gcc.dg/pr35258.c =================================================================== --- gcc.dg/pr35258.c (revision 243884) +++ gcc.dg/pr35258.c (working copy) @@ -10,7 +10,11 @@ char str[9] = "1234"; void bar (void) { +#if __SIZEOF_INT__ >= 4 unsigned int temp; +#else + __UINT32_TYPE__ temp; +#endif char *p = &str[2]; memcpy (&temp, &str[1], 4); Index: gcc.dg/tree-ssa/pr65136.c =================================================================== --- gcc.dg/tree-ssa/pr65136.c (revision 243884) +++ gcc.dg/tree-ssa/pr65136.c (working copy) @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target int32plus } } */ /* { dg-options "-O2 -fdump-rtl-expand-details" } */ int foo(unsigned int cc ) Index: gcc.dg/tree-ssa/pr66449.c =================================================================== --- gcc.dg/tree-ssa/pr66449.c (revision 243884) +++ gcc.dg/tree-ssa/pr66449.c (working copy) @@ -1,6 +1,10 @@ /* { dg-do compile } */ /* { dg-options "-O3" } */ +#if __SIZEOF_POINTER__ != __SIZEOF_LONG__ +#define long __INTPTR_TYPE__ +#endif + void *fn1(void *p1, void *p2, long p3) { long a = (long)p1, b = (long)p2, c = p3; Index: gcc.dg/tree-ssa/pr68529-3.c =================================================================== --- gcc.dg/tree-ssa/pr68529-3.c (revision 243884) +++ gcc.dg/tree-ssa/pr68529-3.c (working copy) @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target size32plus } } */ /* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */ void bar(char *s); Index: gcc.dg/tree-ssa/pr70919.c =================================================================== --- gcc.dg/tree-ssa/pr70919.c (revision 243884) +++ gcc.dg/tree-ssa/pr70919.c (working copy) @@ -4,7 +4,11 @@ #pragma pack(1) struct S0 { +#if __SIZEOF_INT >= 4 int f0:24; +#else + __INT32_TYPE__ f0:24; +#endif }; struct S1 Index: gcc.dg/tree-ssa/pr71408.c =================================================================== --- gcc.dg/tree-ssa/pr71408.c (revision 243884) +++ gcc.dg/tree-ssa/pr71408.c (working copy) @@ -1,6 +1,8 @@ /* PR middle-end/71408 */ /* { dg-do run } */ /* { dg-options "-Os" } */ + +#if __SIZEOF_INT__ >= 4 unsigned a, b; struct S0 @@ -8,6 +10,15 @@ struct S0 int f1:18; unsigned f3:4; }; +#else +__UINT32_TYPE__ a, b; + +struct S0 +{ + __INT32_TYPE__ f1:18; + unsigned f3:4; +}; +#endif void fn1 () { Index: gcc.dg/tree-ssa/sra-20.c =================================================================== --- gcc.dg/tree-ssa/sra-20.c (revision 243884) +++ gcc.dg/tree-ssa/sra-20.c (working copy) @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target int32plus } } */ /* { dg-options "-O1 -Wall" } */ /* PR/70013, SRA of constant-pool loads removes initialization of part of d. */ #pragma pack (1) Index: gcc.dg/tree-ssa/ssa-dom-thread-8.c =================================================================== --- gcc.dg/tree-ssa/ssa-dom-thread-8.c (revision 243884) +++ gcc.dg/tree-ssa/ssa-dom-thread-8.c (working copy) @@ -300,7 +300,11 @@ f2 (struct C *x) else { o = f2 (x); +#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ if (((unsigned long) o > (unsigned long) -4000L)) +#elif __SIZEOF_POINTER__ == __SIZEOF_INT__ + if (((__UINTPTR_TYPE__) o > (__UINTPTR_TYPE__) -4000U)) +#endif { e = 5; goto out; @@ -384,7 +388,11 @@ f2 (struct C *x) break; case 19: o = f2 (x); +#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ if (((unsigned long) o > (unsigned long) -4000L)) +#elif __SIZEOF_POINTER__ == __SIZEOF_INT__ + if (((__UINTPTR_TYPE__) o > (__UINTPTR_TYPE__) -4000U)) +#endif { e = 6; goto out; Index: gcc.dg/tree-ssa/tailcall-7-run.c =================================================================== --- gcc.dg/tree-ssa/tailcall-7-run.c (revision 243884) +++ gcc.dg/tree-ssa/tailcall-7-run.c (working copy) @@ -1,4 +1,4 @@ -/* { dg-do run } */ +/* { dg-do run { target trampolines } } */ /* { dg-options "-O2" } */ /* { dg-additional-sources "tailcall-7.c" } */