Message ID | 20231121232704.12336-3-palmer@rivosinc.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp979078vqb; Tue, 21 Nov 2023 15:29:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGthM6pLHNFg5jyemwhBb/Gy9vgnhp06jrE7QipnzqIEh7o0b+T80Hsg0daANPDi+FL+wjj X-Received: by 2002:a81:a0c8:0:b0:59a:f131:50fa with SMTP id x191-20020a81a0c8000000b0059af13150famr508114ywg.47.1700609343841; Tue, 21 Nov 2023 15:29:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700609343; cv=pass; d=google.com; s=arc-20160816; b=npwIhYxafvJ4RrG/kfi79FR5O5KnC61yNs5EKJzzl4jN2HhamfbW+LdPcqRSgCxUq7 Xp9UbQbp11JDQpnuyoR/rHcHrGhjisfhjSpVteAiCWhNC/UiIq+nUHSh6AOJUsUKyb7F VkrNW4m/JRuzT0pUV4b3hXl95t3LDDi2NHj2FIfDa1bK/q84SmizhX6iDQJ5ekr/4wXT SJReMJKX/ltH6qbisX7S/WJD/C3OWctOuMpaz6SKA4bgOLwfWqNE9a2UNr+WZfJ7yAdU PPWT5UbL5+st8KQZt0paj+sKm2foCA7EaucmfcZ1iB1lIbOKF8H2RbJ+XOvfrKTlqVE+ 8Gug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:from:cc :content-transfer-encoding:mime-version:message-id:date:subject :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=hlksFMkqhHJ/wZjl/sWDSyNorZ+ufY24yZbTPo1UokI=; fh=sU5DkjW7E2gzNbjuGhkUcPT8kDt9KEmCY/jPBbGVrG4=; b=fqbfP9OzkK8MpHNq4MvUeCK2ye/loq1YuuERMLzC1369k9eHJ/tKsKSjTbE10paZSO Q5b0NrSTlWRIi5qie7C1hELl3dzTudwlT/2pAOzYCCtQE2flTrSC0QiZGPEcR6Y9whFM X0SXPQ6DIv4+qbRwpx/TAGcR0SDqla4shxUMDmYW5c5f1HR11C5NTk76IfQACdAUvzJZ X9le/lD1uNNYPRF8zsqzbHEAX+0RCrVOredY7jDkZphweW18k3SVKqBYch8VtQ67Ep2s Ef3g852F85+Db351h0ERmSFM2aWjAx5AMYQctDSscQRsgegxpOs2gZYPCbN+M8XjeghF oy1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="rx4g/cPZ"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a8-20020ad441c8000000b00677f632b19bsi9146697qvq.351.2023.11.21.15.29.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 15:29:03 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="rx4g/cPZ"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 983C5385841A for <ouuuleilei@gmail.com>; Tue, 21 Nov 2023 23:29:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 149593858C36 for <gcc-patches@gcc.gnu.org>; Tue, 21 Nov 2023 23:28:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 149593858C36 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 149593858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700609319; cv=none; b=x7aT4wvWI5ytDW63W6GO9MdVeNT4ghnLMDDktBbJdgq+MQjvwks8y7GFN2DM0TBtjce1kz02vNEfdhmLGjtzQWFRfE7fSHxT3J+GSzVh0wXYeXOIwu6Z7DkYSqobwZoamL4nqaPu1WAsoy2SNg4jp2pUgS4c68vC/UcpZN9tAps= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700609319; c=relaxed/simple; bh=7Tcz/OzMBCbMqMMHwZMC+7xAx4cdC3IU03yh1KgmuYI=; h=DKIM-Signature:Subject:Date:Message-ID:MIME-Version:From:To; b=dKbQTjCWiQQiA+bK6CX4Lbi7VhW64OswuDUC9l7LZyY/IxcnTL5mCAZkUpJRpIUEcgbPCFiw/EmePX4S/tArAYBi5y5aCeOxuX88ZpTnWwomSD52QeheUBY7xkKnWLjU7Pn/B+F7HxbeHfO59PK3fzV/U4+IFVk9Sf+M7GjNq2M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1cc2fc281cdso43302285ad.0 for <gcc-patches@gcc.gnu.org>; Tue, 21 Nov 2023 15:28:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1700609317; x=1701214117; darn=gcc.gnu.org; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=hlksFMkqhHJ/wZjl/sWDSyNorZ+ufY24yZbTPo1UokI=; b=rx4g/cPZWnUitLS6MK7HFlCnujpW8NC3a0gOQYbpEPZmNEdeTJGKp+P/9HpQeLsROY GNgtLPvPUvnabRZjOMzKEmfyPsgtCPAggdChvfuKLpQWW71nYk/gTiw0zbPsdQ/74H5q PDQ8DY36f56tJxX8V8sjsg0k+acXpUjTNrDTdSIpI2Q2N5qUMjKTi2a2D4hSOoRLH+sx Rf0tdEffcE0pXfbrOjtNomSIr6+2H0m0qO52WMBxuqyp8QNgcZMcgfJtptj88ONLfN35 khSczA/SpjtkJp/d+yzesajBeHr8XmWf8K3Ge5C2f8zBgWYvoF2fL1wIG/taMFl7ttjv vHLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700609317; x=1701214117; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hlksFMkqhHJ/wZjl/sWDSyNorZ+ufY24yZbTPo1UokI=; b=KEMcIiyub3z/lvpzG0kPmJM8PGfpIimic+1iivOJDpybaRuRxKDlopK1E7euC9BMJS leGQY4tMfRAfQONB7K2V4CEqets0Da/L0ZYKaiQPHqlUl8mb27rLGsUKztsaU1lAfXv4 JxSDE1yy/Ga0NDAsDnMXO8w7wjfz34oA/pmIrbmYadmpv5i5ApRxkRHCqbbRrdxIH7Pf LfgiKWp1ZCDVVVUTx9I4KLOFDSGLIkAF52by5HxaQAYTs4gPE32IaIa8lTYs/6ix9GBv WWTlezcWdFhSxw7A2VcaTymyjcwOB+3y9DS0l0wb+PBW60lD+IYROVdcgoiuYgwvI2/u BcKQ== X-Gm-Message-State: AOJu0YwChQ9Mchinh4NCZr939X5fs81EUiROkoqREclhGFY2aayL21hL qRP9XgEeLFAmotDdEW2INvqegA== X-Received: by 2002:a17:902:a411:b0:1cf:677b:6c2b with SMTP id p17-20020a170902a41100b001cf677b6c2bmr556429plq.29.1700609316881; Tue, 21 Nov 2023 15:28:36 -0800 (PST) Received: from localhost ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id jc12-20020a17090325cc00b001cf639e5ca6sm3781278plb.307.2023.11.21.15.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 15:28:36 -0800 (PST) Subject: [PATCH 1/2] testsuite/unroll-8: Avoid triggering undefined behavior Date: Tue, 21 Nov 2023 15:27:05 -0800 Message-ID: <20231121232704.12336-3-palmer@rivosinc.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Palmer Dabbelt <palmer@rivosinc.com> From: Palmer Dabbelt <palmer@rivosinc.com> To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783218143023851570 X-GMAIL-MSGID: 1783218143023851570 |
Series |
[1/2] testsuite/unroll-8: Avoid triggering undefined behavior
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Palmer Dabbelt
Nov. 21, 2023, 11:27 p.m. UTC
I was poking around with this test failure and noticed it was exercising undefined behavior. The return type doesn't matter for what's being tested, so just mark it as void. gcc/testsuite/ChangeLog: * gcc.dg/unroll-8.c: Remove UB. --- I didn't tes this, but it seems trivial enough that I'm just going to throw it at the bots and hope I'm right. --- gcc/testsuite/gcc.dg/unroll-8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/unroll-8.c b/gcc/testsuite/gcc.dg/unroll-8.c index 4388f47d4c7..06d32e56893 100644 --- a/gcc/testsuite/gcc.dg/unroll-8.c +++ b/gcc/testsuite/gcc.dg/unroll-8.c @@ -3,7 +3,7 @@ /* { dg-additional-options "-fno-tree-vectorize" { target amdgcn-*-* } } */ struct a {int a[7];}; -int t(struct a *a, int n) +void t(struct a *a, int n) { int i; for (i=0;i<n;i++)