From patchwork Wed Jun 16 04:23:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 55839 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 EC7C0B7D81 for ; Wed, 16 Jun 2010 14:23:37 +1000 (EST) Received: (qmail 25880 invoked by alias); 16 Jun 2010 04:23:32 -0000 Received: (qmail 25866 invoked by uid 22791); 16 Jun 2010 04:23:31 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-px0-f175.google.com (HELO mail-px0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jun 2010 04:23:27 +0000 Received: by pxi3 with SMTP id 3so2932897pxi.20 for ; Tue, 15 Jun 2010 21:23:24 -0700 (PDT) Received: by 10.141.90.21 with SMTP id s21mr6593049rvl.118.1276662204575; Tue, 15 Jun 2010 21:23:24 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id b12sm6532397rvn.10.2010.06.15.21.23.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Jun 2010 21:23:23 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 79D50170C47B; Wed, 16 Jun 2010 13:53:17 +0930 (CST) Date: Wed, 16 Jun 2010 13:53:17 +0930 From: Alan Modra To: gcc-patches@gcc.gnu.org Subject: testsuite/gcc.dg/vect/pr44507.c Message-ID: <20100616042317.GI9748@bubble.grove.modra.org> Mail-Followup-To: gcc-patches@gcc.gnu.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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 testsuite/gcc.dg/vect/pr44507.c is invalid on LP64. This: curVal = *((unsigned long *)(&pArray[index])); loads 8 bytes, ie. the last time around the loop this loads 4 bytes past the end of the array. On big-endian machines this is the low 32 bits so the test fails. Committing the following as obvious. * gcc.dg/vect/pr44507.c (seeIf256ByteArrayIsConstant): Correct cast. Index: gcc/testsuite/gcc.dg/vect/pr44507.c =================================================================== --- gcc/testsuite/gcc.dg/vect/pr44507.c (revision 160773) +++ gcc/testsuite/gcc.dg/vect/pr44507.c (working copy) @@ -16,7 +16,7 @@ int seeIf256ByteArrayIsConstant( index < 64; index += (int)sizeof(unsigned int)) { - curVal = *((unsigned long *)(&pArray[index])); + curVal = *((unsigned int *)(&pArray[index])); orVal = orVal | curVal; andVal = andVal & curVal; }