From patchwork Mon Nov 21 14:57:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Gretton-Dann X-Patchwork-Id: 126807 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 D2369B6F6B for ; Tue, 22 Nov 2011 01:57:44 +1100 (EST) Received: (qmail 29584 invoked by alias); 21 Nov 2011 14:57:42 -0000 Received: (qmail 29401 invoked by uid 22791); 21 Nov 2011 14:57:41 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Nov 2011 14:57:08 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 21 Nov 2011 14:57:05 +0000 Received: from [10.1.69.27] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 21 Nov 2011 14:57:01 +0000 Message-ID: <4ECA66BD.10105@arm.com> Date: Mon, 21 Nov 2011 14:57:01 +0000 From: Matthew Gretton-Dann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110928 Thunderbird/7.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Jakub Jelinek , ro@cebitec.uni-bielefeld.de, mikestump@comcast.net Subject: [RFA/testsuite] Update gcc.dg/vshift-*.c tests to use rand and not random X-MC-Unique: 111112114570501001 X-IsSubscribed: yes 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 All, [Apologies to those getting this twice - used wrong account to send it initially]. The attached patch updates the gcc.dg/vshift-*.c tests to call the function rand and not random, as random is not available on all targets, but rand should be as it is in the Standard C Library. Can someone please review the patch? Thanks, Matt gcc/testsuite/ChangeLog: 2011-11-21 Matthew Gretton-Dann * gcc.dg/vshift-1.c (main): Call rand instead of random. * gcc.dg/vshift-3.c (main): Likewise. diff --git a/gcc/testsuite/gcc.dg/vshift-1.c b/gcc/testsuite/gcc.dg/vshift-1.c index 2a237aa..2220ad5 100644 --- a/gcc/testsuite/gcc.dg/vshift-1.c +++ b/gcc/testsuite/gcc.dg/vshift-1.c @@ -94,10 +94,10 @@ main () for (i = 0; i < N; i++) { asm (""); - c[i] = (random () << 1) | (random () & 1); + c[i] = (rand () << 1) | (rand () & 1); b[i] = (i * 85) & (sizeof (TYPE1) * __CHAR_BIT__ - 1); a[i] = c[i]; - d[i] = (random () << 1) | (random () & 1); + d[i] = (rand () << 1) | (rand () & 1); d[i] |= (unsigned long long) c[i] << 32; e[i] = (i * 85) & (sizeof (TYPE2) * __CHAR_BIT__ - 1); f[i] = d[i]; diff --git a/gcc/testsuite/gcc.dg/vshift-3.c b/gcc/testsuite/gcc.dg/vshift-3.c index e62c76b..367e660 100644 --- a/gcc/testsuite/gcc.dg/vshift-3.c +++ b/gcc/testsuite/gcc.dg/vshift-3.c @@ -100,9 +100,9 @@ main () for (i = 0; i < N; i++) { asm (""); - c[i] = (random () << 1) | (random () & 1); + c[i] = (rand () << 1) | (rand () & 1); a[i] = c[i]; - d[i] = (random () << 1) | (random () & 1); + d[i] = (rand () << 1) | (rand () & 1); d[i] |= (unsigned long long) c[i] << 32; f[i] = d[i]; }