From patchwork Thu Feb 26 23:34:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pat Haugen X-Patchwork-Id: 444091 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 806CA14008F for ; Fri, 27 Feb 2015 10:34:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=BEhcLSWd; dkim-adsp=none (unprotected policy); 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 :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; q=dns; s=default; b=BG5sDirEuUUGDXCp XDh0+d8G3KIgTjW63BpFxgT9a5eLl6ArIVSJxssHtpSmUNH51M6bAAQZIUOKe1ws SzPFSYXjJtGWw4GDO/R+a+pU5uQMWOnESWJx3PeT7pdWfRwzPJrGGpQdNm/lZGL0 3CGpvqoDp+mEMBrs9VG4jmicWzI= 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 :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; s=default; bh=M9dADq35p6NuZbvkqUkqMw ICacE=; b=BEhcLSWdVaELC+3O3VLTibvPAmQZlo2fwrAT+Qvw3xTPenx2/l0YuS 5hUmIpuJ+ztrVT1O6WyoLhqbx2JLkzN2QJw0K6P0yixCZl4ITDKG4DsdK+U3b9yh ZeYJmf2QPpbGEjY9L+4vxg9XY+VPxkDG2fau/NHO7PLtLYXi+jv9U= Received: (qmail 48126 invoked by alias); 26 Feb 2015 23:34: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 48114 invoked by uid 89); 26 Feb 2015 23:34:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e8.ny.us.ibm.com Received: from e8.ny.us.ibm.com (HELO e8.ny.us.ibm.com) (32.97.182.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 26 Feb 2015 23:34:19 +0000 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Feb 2015 18:34:17 -0500 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e8.ny.us.ibm.com (192.168.1.108) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 26 Feb 2015 18:34:15 -0500 Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 7EF8C38C8026 for ; Thu, 26 Feb 2015 18:34:15 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1QNYFTo28508160 for ; Thu, 26 Feb 2015 23:34:15 GMT Received: from d01av04.pok.ibm.com (localhost [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1QNYEGS023091 for ; Thu, 26 Feb 2015 18:34:14 -0500 Received: from pthw510.ibm.com ([9.50.22.130]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t1QNYEVa023074 for ; Thu, 26 Feb 2015 18:34:14 -0500 Message-ID: <54EFAD76.7040409@linux.vnet.ibm.com> Date: Thu, 26 Feb 2015 17:34:14 -0600 From: Pat Haugen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH, testsuite] Fix gcc.dg/vect/pr59354.c X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15022623-0029-0000-0000-0000021C21DF X-IsSubscribed: yes The subject testcase is failing on older powerpc64 hardware that doesn't support vector instructions because the prolog code is saving callee save vector registers used in the loop before the check_vect() call has even been performed. Following was tested on powerpc64-linux. Ok for trunk/4.9 branch? -Pat 2015-02-26 Pat Haugen gcc/testsuite: * gcc.dg/vect/pr59354.c: Move vector producing code to separate function. Index: gcc.dg/vect/pr59354.c =================================================================== --- gcc.dg/vect/pr59354.c (revision 221016) +++ gcc.dg/vect/pr59354.c (working copy) @@ -8,12 +8,11 @@ void abort (void); unsigned int a[256]; unsigned char b[256]; -int main() +__attribute__ ((noinline)) void +main1() { int i, z, x, y; - check_vect (); - for(i = 0; i < 256; i++) { a[i] = i % 5; @@ -27,6 +26,13 @@ int main() if (b[4] != 1) abort (); +} + +int main (void) +{ + check_vect (); + + main1 (); return 0; }