From patchwork Wed May 25 13:23:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumar Selvaraj X-Patchwork-Id: 626190 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 3rFD6Y4NGpz9sRZ for ; Wed, 25 May 2016 23:44:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=CmdygSTi; 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:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=nDnw9RVVRNpvCp2nNEp77H0w5VrS2tSKDIbRjLsFfV0YuOkHVp1wm LBUmkECFeLvmMk8T0x/opJ6Rf5KHe7Q1BudUpfa9StWYo1BToMrmS/BwwOZgqsGz iDRSmWI4GCjMx7SHSMpGExPnE/87oLD87I/k5+vt7cY9+jycSEU0oA= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=x1IEcwerZRb343IxidKi8tvLIbo=; b=CmdygSTihUUW1aPn10mQ mgSlNBTnpoedpqqjph/MqNc/0iSb7hKYjaUlTamksXQz2gg3ZzwzNeq9NtFzuTFC nufR701Es4+5SNaRUBmP9g7NlpBGWxanAHyJzanvqsJT5CR28aztuN1SwOTVwfu/ t46JWV9ibJwbSoVrgfS0n4E= Received: (qmail 75117 invoked by alias); 25 May 2016 13:44:45 -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 75104 invoked by uid 89); 25 May 2016 13:44:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=harvard, Harvard, H*r:0200, H*RU:14.3.235.1 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 25 May 2016 13:44:34 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46485) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1b5Z6t-0007Vp-MN for gcc-patches@gnu.org; Wed, 25 May 2016 09:44:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5Z6o-0008Ea-Dl for gcc-patches@gnu.org; Wed, 25 May 2016 09:44:31 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:18998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5Z6o-0008EJ-03 for gcc-patches@gnu.org; Wed, 25 May 2016 09:44:26 -0400 Received: from HNOCHT01.corp.atmel.com (10.161.30.161) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server (TLS) id 14.3.235.1; Wed, 25 May 2016 15:23:50 +0200 Received: from jaguar.atmel.com (10.161.30.18) by HNOCHT01.corp.atmel.com (10.161.30.161) with Microsoft SMTP Server (TLS) id 14.3.235.1; Wed, 25 May 2016 15:23:52 +0200 User-agent: mu4e 0.9.17; emacs 24.5.1 From: Senthil Kumar Selvaraj To: gcc-patches , Mike Stump Subject: [Patch, testsuite] Make some more tests xfail/pass/unsupported for avr Date: Wed, 25 May 2016 18:53:51 +0530 Message-ID: <87bn3uqniw.fsf@atmel.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 212.144.249.242 X-IsSubscribed: yes Hi, This patch attempts to fix some bogus testsuite failures by either slightly modifying the test, adding xfail for int16 targets, or by using the appropriate dg-require-effective-target/dg-skip-if directive. The only tricky changes I see are * changing usage of unsigned long to __SIZE_TYPE__ aka size_t for a couple of tests (arg type of malloc in Warray-bounds-11.c and in a typedef for size_t in pr62090-2.c). This makes the tests pass for avr and x86_64. * Skipping pr70169.c for avr, as the test doesn't appear valid for a modified Harvard architecture. The compiler warns that the pointer is attempting to access data memory with a program memory address, and the extra warning causes the test to fail. Regtesting with x86_64 showed no new regressions. The avr target of course shows a bunch of new PASS/UNSUPPORTED/XFAILs. If ok, could someone commit please? I don't have commit access. Regards Senthil 2016-05-25 Senthil Kumar Selvaraj * c-c++-common/Wduplicated-cond-1.c: Use smaller const literal. * c-c++-common/pr60226.c: Require int32plus. * gcc.c-torture/execute/pr70602.c: Likewise. * gcc.dg/Warray-bounds-11.c: Use __SIZE_TYPE__ instead of unsigned long for malloc arg type. * gcc.dg/asr_div1.c: Require int32plus. * gcc.dg/enum-mode-1.c: XFAIL for int16. * gcc.dg/pie-1.c: Require pie. * gcc.dg/pie-2.c: Likewise. * gcc.dg/pr59471.c: Require int32plus. * gcc.dg/pr59963-2.c: XFAIL for int16. * gcc.dg/pr60114.c: Require int32plus. * gcc.dg/pr62090-2.c: Use __SIZE_TYPE__ instead of unsigned long for typedef of size_t. * gcc.dg/pr63914.c: Require int32plus. * gcc.dg/pr64536.c: Require pt32plus. * gcc.dg/pr65658.c: Likewise. * gcc.dg/pr67271.c: Require int32plus. * gcc.dg/pr68112.c: Likewise. * gcc.dg/pr69071.c: Skip for avr target. * gcc.dg/pr69973.c: Require int32plus. * gcc.dg/pr70169.c: Skip for avr target. * gcc.dg/sso-6.c: Require int32plus. * gcc.dg/sso-7.c: Likewise. * gcc.dg/sso-8.c: Likewise. * gcc.dg/vrp-min-max-2.c: Likewise. diff --git gcc/testsuite/c-c++-common/Wduplicated-cond-1.c gcc/testsuite/c-c++-common/Wduplicated-cond-1.c index 4763a84..179c419 100644 --- gcc/testsuite/c-c++-common/Wduplicated-cond-1.c +++ gcc/testsuite/c-c++-common/Wduplicated-cond-1.c @@ -183,7 +183,7 @@ int fn10 (void) { if (foo ()) - return 1732984; + return 17329; else if (foo ()) return 18409; return 0; diff --git gcc/testsuite/c-c++-common/pr60226.c gcc/testsuite/c-c++-common/pr60226.c index 6a686d7..aeb132b8 100644 --- gcc/testsuite/c-c++-common/pr60226.c +++ gcc/testsuite/c-c++-common/pr60226.c @@ -1,6 +1,7 @@ /* PR c/60226 */ /* { dg-do compile } */ /* { dg-options "-Wno-c++-compat" { target c } } */ +/* { dg-require-effective-target int32plus } */ typedef int __attribute__ ((aligned (1 << 28))) int28; int28 foo[4] = {}; /* { dg-error "alignment of array elements is greater than element size" } */ diff --git gcc/testsuite/gcc.c-torture/execute/pr70602.c gcc/testsuite/gcc.c-torture/execute/pr70602.c index c6628b0..4a931fc 100644 --- gcc/testsuite/gcc.c-torture/execute/pr70602.c +++ gcc/testsuite/gcc.c-torture/execute/pr70602.c @@ -1,4 +1,5 @@ /* PR tree-optimization/70602 */ +/* { dg-require-effective-target int32plus } */ struct __attribute__((packed)) S { diff --git gcc/testsuite/gcc.dg/Warray-bounds-11.c gcc/testsuite/gcc.dg/Warray-bounds-11.c index 92e92c0..089fa00 100644 --- gcc/testsuite/gcc.dg/Warray-bounds-11.c +++ gcc/testsuite/gcc.dg/Warray-bounds-11.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-O3 -Warray-bounds=2" } */ -extern void* malloc(unsigned long x); +typedef __SIZE_TYPE__ size_t; +extern void* malloc(size_t x); int e[3]; diff --git gcc/testsuite/gcc.dg/asr_div1.c gcc/testsuite/gcc.dg/asr_div1.c index 11b5246..bf374b8 100644 --- gcc/testsuite/gcc.dg/asr_div1.c +++ gcc/testsuite/gcc.dg/asr_div1.c @@ -1,6 +1,7 @@ /* Test division by const int generates only one shift. */ /* { dg-do run } */ /* { dg-options "-O2 -fdump-rtl-combine-all" } */ +/* { dg-require-effective-target int32plus } */ extern void abort (void); diff --git gcc/testsuite/gcc.dg/enum-mode-1.c gcc/testsuite/gcc.dg/enum-mode-1.c index a701123..09276b7 100644 --- gcc/testsuite/gcc.dg/enum-mode-1.c +++ gcc/testsuite/gcc.dg/enum-mode-1.c @@ -6,5 +6,5 @@ enum e2 { B = 256 } __attribute__((__packed__, __mode__(__byte__))); /* { dg-err enum e3 { C = __INT_MAX__ } __attribute__((__mode__(__QI__))); /* { dg-error "specified mode too small for enumeral values" } */ enum e4 { D = __INT_MAX__ } __attribute__((__packed__, __mode__(__QI__))); /* { dg-error "specified mode too small for enumeral values" } */ -enum e5 { E = __INT_MAX__ } __attribute__((__mode__(__HI__))); /* { dg-error "specified mode too small for enumeral values" } */ -enum e6 { F = __INT_MAX__ } __attribute__((__packed__, __mode__(__HI__))); /* { dg-error "specified mode too small for enumeral values" } */ +enum e5 { E = __INT_MAX__ } __attribute__((__mode__(__HI__))); /* { dg-error "specified mode too small for enumeral values" "" { xfail int16 } } */ +enum e6 { F = __INT_MAX__ } __attribute__((__packed__, __mode__(__HI__))); /* { dg-error "specified mode too small for enumeral values" "" { xfail int16 } } */ diff --git gcc/testsuite/gcc.dg/pie-1.c gcc/testsuite/gcc.dg/pie-1.c index e64763b..3f6e371 100644 --- gcc/testsuite/gcc.dg/pie-1.c +++ gcc/testsuite/gcc.dg/pie-1.c @@ -1,5 +1,6 @@ /* { dg-do compile { target { ! { *-*-darwin* hppa*-*-* } } } } */ /* { dg-options "-fpie" } */ +/* { dg-require-effective-target pie } */ #if __PIC__ != 1 # error __PIC__ is not 1! diff --git gcc/testsuite/gcc.dg/pie-2.c gcc/testsuite/gcc.dg/pie-2.c index e185e51..7bdc4ac 100644 --- gcc/testsuite/gcc.dg/pie-2.c +++ gcc/testsuite/gcc.dg/pie-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fPIE" } */ +/* { dg-require-effective-target pie } */ #if __PIC__ != 2 # error __PIC__ is not 2! diff --git gcc/testsuite/gcc.dg/pr59471.c gcc/testsuite/gcc.dg/pr59471.c index 7f2a787..bb27fbe 100644 --- gcc/testsuite/gcc.dg/pr59471.c +++ gcc/testsuite/gcc.dg/pr59471.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target int32plus } */ typedef unsigned char uint8x4_t __attribute__ ((__vector_size__ (4))); diff --git gcc/testsuite/gcc.dg/pr59963-2.c gcc/testsuite/gcc.dg/pr59963-2.c index ea05946..6e0a6d6 100644 --- gcc/testsuite/gcc.dg/pr59963-2.c +++ gcc/testsuite/gcc.dg/pr59963-2.c @@ -32,5 +32,5 @@ foo (int i) -7, /* { dg-warning "8:negative integer implicitly converted to unsigned type" } */ -8); /* { dg-warning "9:negative integer implicitly converted to unsigned type" } */ bazu (i, i); /* { dg-warning "9:conversion" } */ - bazi (0x8, 0x80000000); /* { dg-warning "14:conversion of unsigned constant value to negative integer" } */ + bazi (0x8, 0x80000000); /* { dg-warning "14:conversion of unsigned constant value to negative integer" "" { xfail int16 } } */ } diff --git gcc/testsuite/gcc.dg/pr60114.c gcc/testsuite/gcc.dg/pr60114.c index c656a95..a2db9c9 100644 --- gcc/testsuite/gcc.dg/pr60114.c +++ gcc/testsuite/gcc.dg/pr60114.c @@ -1,6 +1,7 @@ /* PR c/60114 */ /* { dg-do compile } */ /* { dg-options "-Wconversion" } */ +/* { dg-require-effective-target int32plus } */ struct S { int n, u[2]; }; const signed char z[] = { diff --git gcc/testsuite/gcc.dg/pr62090-2.c gcc/testsuite/gcc.dg/pr62090-2.c index 5bddc53..af82ede 100644 --- gcc/testsuite/gcc.dg/pr62090-2.c +++ gcc/testsuite/gcc.dg/pr62090-2.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ -typedef long unsigned int size_t; +typedef __SIZE_TYPE__ size_t; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) diff --git gcc/testsuite/gcc.dg/pr63914.c gcc/testsuite/gcc.dg/pr63914.c index 8bf18b3..df8f537 100644 --- gcc/testsuite/gcc.dg/pr63914.c +++ gcc/testsuite/gcc.dg/pr63914.c @@ -3,6 +3,7 @@ /* { dg-prune-output "non-standard ABI extension" } */ /* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */ /* { dg-additional-options "-msse" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-require-effective-target int32plus } */ typedef float __m128 __attribute__ ((__vector_size__ (16))); __m128 a, d, e; diff --git gcc/testsuite/gcc.dg/pr64536.c gcc/testsuite/gcc.dg/pr64536.c index 9a79829..f2728fb 100644 --- gcc/testsuite/gcc.dg/pr64536.c +++ gcc/testsuite/gcc.dg/pr64536.c @@ -2,6 +2,7 @@ /* { dg-do link } */ /* { dg-options "-O2" } */ /* { dg-additional-options "-fPIC" { target fpic } } */ +/* { dg-require-effective-target ptr32plus } */ struct S { long q; } *h; long a, b, g, j, k, *c, *d, *e, *f, *i; diff --git gcc/testsuite/gcc.dg/pr65658.c gcc/testsuite/gcc.dg/pr65658.c index cce0f2a..bb5c37a 100644 --- gcc/testsuite/gcc.dg/pr65658.c +++ gcc/testsuite/gcc.dg/pr65658.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2 -Wno-implicit" } */ +/* { dg-require-effective-target ptr32plus } */ extern int optind; struct undefinfo diff --git gcc/testsuite/gcc.dg/pr67271.c gcc/testsuite/gcc.dg/pr67271.c index b6988a3..977e253 100644 --- gcc/testsuite/gcc.dg/pr67271.c +++ gcc/testsuite/gcc.dg/pr67271.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O" } */ +/* { dg-require-effective-target int32plus } */ extern long int labs (long int j); int diff --git gcc/testsuite/gcc.dg/pr68112.c gcc/testsuite/gcc.dg/pr68112.c index 0a45b03..9c7a59c 100644 --- gcc/testsuite/gcc.dg/pr68112.c +++ gcc/testsuite/gcc.dg/pr68112.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Waggressive-loop-optimizations" } */ +/* { dg-require-effective-target int32plus } */ int *a; diff --git gcc/testsuite/gcc.dg/pr69071.c gcc/testsuite/gcc.dg/pr69071.c index 1a17a94..0396bbc 100644 --- gcc/testsuite/gcc.dg/pr69071.c +++ gcc/testsuite/gcc.dg/pr69071.c @@ -1,6 +1,7 @@ /* PR target/69071 */ /* { dg-do compile } */ /* { dg-options "-O2 -g" } */ +/* { dg-skip-if "Array too big" { "avr-*-*" } } */ void *bar (void *); diff --git gcc/testsuite/gcc.dg/pr69973.c gcc/testsuite/gcc.dg/pr69973.c index 648bc56..8698954 100644 --- gcc/testsuite/gcc.dg/pr69973.c +++ gcc/testsuite/gcc.dg/pr69973.c @@ -1,2 +1,3 @@ /* { dg-do compile } */ +/* { dg-require-effective-target int32plus } */ typedef int v4si __attribute__ ((vector_size (1 << 29))); diff --git gcc/testsuite/gcc.dg/pr70169.c gcc/testsuite/gcc.dg/pr70169.c index 8d08f5c..41381e7 100644 --- gcc/testsuite/gcc.dg/pr70169.c +++ gcc/testsuite/gcc.dg/pr70169.c @@ -1,6 +1,7 @@ /* PR tree-optimization/70169 */ /* { dg-do compile } */ /* { dg-options "-O2 -fno-strict-aliasing -fno-tree-dce" } */ +/* { dg-skip-if "Program and data reside in different address spaces" { "avr-*-*" } } */ int printf (const char *, ...); diff --git gcc/testsuite/gcc.dg/sso-6.c gcc/testsuite/gcc.dg/sso-6.c index 48759b4..e955fa9 100644 --- gcc/testsuite/gcc.dg/sso-6.c +++ gcc/testsuite/gcc.dg/sso-6.c @@ -1,6 +1,7 @@ /* Test support of scalar_storage_order pragma */ /* { dg-do run } */ +/* { dg-require-effective-target int32plus } */ #pragma scalar_storage_order /* { dg-warning "missing .big-endian.little-endian.default." } */ diff --git gcc/testsuite/gcc.dg/sso-7.c gcc/testsuite/gcc.dg/sso-7.c index b4d9d65..51902ab 100644 --- gcc/testsuite/gcc.dg/sso-7.c +++ gcc/testsuite/gcc.dg/sso-7.c @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-fsso-struct=big-endian" } */ +/* { dg-require-effective-target int32plus } */ struct S1 { diff --git gcc/testsuite/gcc.dg/sso-8.c gcc/testsuite/gcc.dg/sso-8.c index 1938835..5148188 100644 --- gcc/testsuite/gcc.dg/sso-8.c +++ gcc/testsuite/gcc.dg/sso-8.c @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-fsso-struct=little-endian" } */ +/* { dg-require-effective-target int32plus } */ struct S1 { diff --git gcc/testsuite/gcc.dg/vrp-min-max-2.c gcc/testsuite/gcc.dg/vrp-min-max-2.c index a3ccc66..3936088 100644 --- gcc/testsuite/gcc.dg/vrp-min-max-2.c +++ gcc/testsuite/gcc.dg/vrp-min-max-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-vrp2" } */ +/* { dg-require-effective-target int32plus } */ int Foo (int X) {