From patchwork Mon Sep 30 14:23:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 279169 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 90B7F2C0090 for ; Tue, 1 Oct 2013 00:24:18 +1000 (EST) 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=dH65N+EsrR9HrnY1XOAKXWZpUIV36ozaYWHSzR/ArWu1a8e12Y41E ENKzGuTZufeM2tGROo9p6jhTgmzPFvOZvYbL/5SdJlRRBVO8SvXcwlXnfaHrcQvf nWkk36D46oe81VwUddT0LkvfsOzTehRUbuwbRUHvmKb43bn/rhyKhg= 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=nggtuu5kYo3fxcp7EaudKfzZPpA=; b=J60Pozs9PHSDxAdCMOr1 eCk0GY8P8VOVlUgcr5CFPzBtsuCTXnX5BbJbt0MVkK32JR8lURSxXiQXGfNbmB+u hZOyiX6HrC6PQJJWfjuSq41wT/MaK/uX/KRZj7QmqkVnCS3wE3efTNrheCBVYwMc kOnQ4ntOHr55HLRYwRduRpQ= Received: (qmail 17041 invoked by alias); 30 Sep 2013 14:24:12 -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 17030 invoked by uid 89); 30 Sep 2013 14:24:12 -0000 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; Mon, 30 Sep 2013 14:24:12 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com 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 r8UEO94t020493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 30 Sep 2013 10:24:09 -0400 Received: from Cadeux.redhat.com (vpn1-4-202.ams2.redhat.com [10.36.4.202]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8UEO5Q6030347 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 30 Sep 2013 10:24:08 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: RFA: GCC Testsuite: Annotate compile tests that need at least 32-bit pointers/integers Date: Mon, 30 Sep 2013 15:23:01 +0100 Message-ID: <874n924ce2.fsf@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi Guys, Several tests in the gcc.c-torture/compile directory need a target with 32-bit integers and/or 32-bit pointers. The patch below adds "dg-require-effective-target in32plus" to these tests. This fixes ~200 unexpected failures for the MSP430, RL78 and XSTORMY16 targets. Note - I have used "dg-require-effective-target int32plus" in preference to "dg-require-effective-target ptr32plus" even if it would appear that a pointer size test would be more appropriate. This is because the check_effective_target_ptr32_plus test is broken for targets that use PSImode (eg the MSP430 in large mode). On the MSP430 for example a PSImode pointer is 20-bits long, but when it is stored in memory it occupies 32-bits. So "sizeof(void *)" returns 4 but really a pointer cannot hold an entire 32-bit address. Tested with no regressions on msp430-elf, rl78-elf and xstormy16-elf targets. OK to apply ? Cheers Nick gcc/testsuite/ChangeLog 2013-09-30 Nick Clifton * gcc.c-torture/compile/20010327-1.c: Only run the test for int32plus targets. * gcc.c-torture/compile/990617-1.c: Likewise. * gcc.c-torture/compile/calls.c: Likewise. * gcc.c-torture/compile/limits-externdecl.c: Likewise. * gcc.c-torture/compile/pr41181.c: Likewise. * gcc.c-torture/compile/pr55955.c: Likewise. Index: gcc/testsuite/gcc.c-torture/compile/20010327-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20010327-1.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/20010327-1.c (working copy) @@ -1,7 +1,4 @@ -/* { dg-skip-if "non-SI pointers" { m32c-*-* } { "*" } { "" } } */ -/* { dg-skip-if "HI mode pointer for avr" { "avr-*-*" } { "*" } { "" } } */ -/* { dg-skip-if "HI mode pointer for pdp11" { "pdp11-*-*" } { "*" } { "" } } */ -/* { dg-skip-if "non-SI pointers for w64" { "x86_64-*-mingw*" } { "*" } { "" } } */ +/* { dg-require-effective-target int32plus } */ /* This testcase tests whether GCC can produce static initialized data that references addresses of size 'unsigned long', even if that's not Index: gcc/testsuite/gcc.c-torture/compile/20020604-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20020604-1.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/20020604-1.c (working copy) @@ -1,7 +1,6 @@ /* { dg-do assemble } */ -/* { dg-skip-if "The array is too big" { "avr-*-*" "pdp11-*-*" } { "*" } { "" } } */ +/* { dg-require-effective-target ptr32plus } */ /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */ -/* { dg-skip-if "" { m32c-*-* } { } { } } */ /* PR c/6957 This testcase ICEd at -O2 on IA-32, because Index: gcc/testsuite/gcc.c-torture/compile/20080625-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20080625-1.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/20080625-1.c (working copy) @@ -1,4 +1,5 @@ -/* { dg-skip-if "too much data" { "avr-*-*" "m32c-*-*" "pdp11-*-*" } { "*" } { "" } } */ +/* { dg-require-effective-target int32plus } */ + struct peakbufStruct { unsigned int lnum [5000]; int lscan [5000][4000]; Index: gcc/testsuite/gcc.c-torture/compile/990617-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/990617-1.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/990617-1.c (working copy) @@ -1,7 +1,5 @@ -/* 0x70000000 is too large a constant to become a pointer on - xstormy16. */ /* { dg-do assemble } */ -/* { dg-xfail-if "" { xstormy16-*-* } { "*" } { "" } } */ +/* { dg-require-effective-target int32plus } */ int main() { Index: gcc/testsuite/gcc.c-torture/compile/calls.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/calls.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/calls.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ typedef void *(*T)(void); f1 () { Index: gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* Inspired by the test case for PR middle-end/52640. */ typedef struct @@ -52,4 +53,4 @@ REFERENCE references[] = { LIM5 (X) 0 -}; /* { dg-error "size of array is too large" "" { target avr-*-* } } */ +}; Index: gcc/testsuite/gcc.c-torture/compile/pr41181.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr41181.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/pr41181.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-skip-if "The array is too big" { "avr-*-*" "pdp11-*-*" } { "*" } { "" } } */ char paths[1024]; static void x264_slicetype_path(char (*best_paths)[250], int n, int length) Index: gcc/testsuite/gcc.c-torture/compile/pr55955.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr55955.c (revision 203032) +++ gcc/testsuite/gcc.c-torture/compile/pr55955.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* PR tree-optimization/55955 */ int b;