From patchwork Thu Mar 16 01:26:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 66438 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A7CC6385800A for ; Thu, 16 Mar 2023 01:27:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7CC6385800A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678930020; bh=5dLTGrfhOto/Hwaq9fUkYJR5ZlxZSZ1xKgaNmRDk+kc=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=UUe7CKmvhG4EewmbDZkEyeqh0ouZHht83OBuJv3JHK7+yMUzcrBVnWoa7oIWG6y9Z Eb5YmEvzCsuBtcxfvbvnleJcF5V8r6AmtYArujnUm2cfryi/Drsex9oWqwtZ4pmSlD l1+cMgWaGQcxi+OakPEtPz5981GbS+5QpofR/1JQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTPS id 5B19C3858C83 for ; Thu, 16 Mar 2023 01:26:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B19C3858C83 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 46B841166EE; Wed, 15 Mar 2023 21:26:30 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0fd6S6XeGaIV; Wed, 15 Mar 2023 21:26:30 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id EA8E71163A7; Wed, 15 Mar 2023 21:26:29 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 32G1QL521035946 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 15 Mar 2023 22:26:21 -0300 To: gcc-patches@gcc.gnu.org Cc: Richard Biener Subject: [PATCH] [testsuite] fix array element count Organization: Free thinker, does not speak for AdaCore Date: Wed, 15 Mar 2023 22:26:21 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alexandre Oliva via Gcc-patches From: Alexandre Oliva Reply-To: Alexandre Oliva Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This test is similar to pr103116-1.c, but instead of writing to 4*COUNT elements of x, it writes to 8*COUNT elements, but the definition of x seems to have been adjusted along with the loop. Fix the array size so that it doesn't scribble over unrelated statically-allocated objects. Regstrapped on ppc64-linux-gnu. Also tested with gcc-11 on vxworks7r2 (x86- and x86_64-), where the scribbling caused visible runtime effects. Ok to install? I'm tempted to put this in as obvious. for gcc/testsuite/ChangeLog * gcc.dg/vect/pr103116-2.c (x): Fix array size. --- gcc/testsuite/gcc.dg/vect/pr103116-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/vect/pr103116-2.c b/gcc/testsuite/gcc.dg/vect/pr103116-2.c index 2f4ed0f404c76..aa9797a94074c 100644 --- a/gcc/testsuite/gcc.dg/vect/pr103116-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr103116-2.c @@ -31,7 +31,7 @@ loop (TYPE *restrict x, TYPE *restrict y) } } -TYPE x[COUNT * 4]; +TYPE x[COUNT * 8]; int main (void)