From patchwork Tue Jun 20 09:45:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lehua Ding X-Patchwork-Id: 110374 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3543357vqr; Tue, 20 Jun 2023 02:46:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5BgjNDm3f7IS2nDWqqSqQgpmsAQLDbXCD+UV9CL5je5QzNAOuzbA6+3cUzRVrWVg/xPJV/ X-Received: by 2002:a2e:9b13:0:b0:2b4:6c47:6257 with SMTP id u19-20020a2e9b13000000b002b46c476257mr4787309lji.40.1687254365153; Tue, 20 Jun 2023 02:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687254365; cv=none; d=google.com; s=arc-20160816; b=QGHsobzLbOMhpVrDHtiT4oLD1qgkYZfMb6rpVIf0b5q8eh5gs3CJ8GccZ0oRGTn22R cpXMBmIbbhd9mvZhWNe1Ki35Ndqt25sEyahiHPWWWsxKtdcdoOIs2dOVFg9VkiDMbTCN 8X/MNVt7TuXXZr0bAU+LbcyPMrj7SrP3vsiB6W7KGBUCQoPu74GT86U0yPyg8QVZsHXE VSaB4VlQVKmNz6RmLGSe4EuRwNrGWijnzz2MKf2lYkf7Lr3PyEqm0VATP71YgymrnW4a GJFjTwCPV+N+QvEnJZCIszp8q3XySGA4oas41Q1vBSEIXc/GuaTsUzrV0Mcb9UOu5tKe AVpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=KLZf/5DRkT5ftIbwgvkdBMLdecax8zkj9qHsMatO0vk=; b=M+h2JRy2iquN3SntCfapYKZuI5cuoHT/qPLSsn372UGdLwve2OivpoiE2wVzynrn1j 7TXZrwCJwPQU0KSGZt8Gp/W7Hg1TxBTiFmUjH6UY8AYNHgw8pqoFjlQ4TK2vuMWVZne0 o9HAygzGTpH0N6FZVfIZaJa9FLCnMz14JN5Yuay/gQx/TY83SP9d2V0YU+2kdC4LpKr/ R9NJMy39Ri+WdDajhZeIMDAqU2Ch3+2mbynFAisOF/MXLDcJMbDpC6oH5becw0cVBzTH 88wFQAYHg7vb8e00kiUf4EobxPQkneeO25Q7681l14VN9x+NHsY24zDQRioOymSjQkQT gowg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c20-20020aa7c754000000b0051a2c2a008bsi913745eds.260.2023.06.20.02.46.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 02:46:05 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 CC9A838582BC for ; Tue, 20 Jun 2023 09:46:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg150.qq.com (smtpbg150.qq.com [18.132.163.193]) by sourceware.org (Postfix) with ESMTPS id 5AEA43858D32 for ; Tue, 20 Jun 2023 09:45:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AEA43858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp88t1687254319tfacboi0 Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 20 Jun 2023 17:45:18 +0800 (CST) X-QQ-SSF: 01400000000000B0E000000A0000000 X-QQ-FEAT: 90EFqYDyPxA3Fb3zx41tguuxNSVP5gwKUc68KRKHezil10GQ4Q4a6UeeOc7pF YkhD8BYQ08eJPRG93dpMHWIBdgha6HiRqgA5342fON4fdD+mBE8bPwhZHOqTPoOU+7synJn 8cGFdbaXagcqiZ7JVGfm7WGtmo8m4xDfLyjbAxcZnY8TpFne4nPk8f7XqztDgqWj8pAlFUs +Qa9ANgB9VoVYDk14bLBz9RkiTu+UGMZDF/gVxAuajPEXtqgtH8QWUGCltqOh1nzbN0FYW/ Axt3CGFsTBVV6iNN183z2WpFiNQNjoH6yesKiLjsOaysXi9inwpBoimTUz3YIgkkPFlh8yD yPHRIAbz6sWtwemjUCSNg7NyTkuo7rw1aTIuJaE7zFQePGex4Q= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 7729489676727931200 From: Lehua Ding To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, rdapp.gcc@gmail.com, kito.cheng@gmail.com, palmer@rivosinc.com, jeffreyalaw@gmail.com, pan2.li@intel.com Subject: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector Date: Tue, 20 Jun 2023 17:45:17 +0800 Message-Id: <20230620094517.3693077-1-lehua.ding@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz5a-3 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, T_SPF_HELO_TEMPERROR 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769214433169162446?= X-GMAIL-MSGID: =?utf-8?q?1769214433169162446?= Hi, This little patch fixes a compile warning issue that my previous patch introduced, sorry for introducing this issue. Best, Lehua gcc/ChangeLog: * config/riscv/riscv.cc (riscv_arg_has_vector): Add default branch. --- gcc/config/riscv/riscv.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 6eb63a9d4de7..9558e28de3fc 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -3820,8 +3820,8 @@ riscv_arg_has_vector (const_tree type) switch (TREE_CODE (type)) { case RECORD_TYPE: - /* If it is a record, it is further determined whether its fileds have - vector type. */ + /* If it is a record, it is further determined whether its fields have + vector type. */ for (tree f = TYPE_FIELDS (type); f; f = DECL_CHAIN (f)) if (TREE_CODE (f) == FIELD_DECL) { @@ -3835,6 +3835,8 @@ riscv_arg_has_vector (const_tree type) break; case ARRAY_TYPE: return riscv_arg_has_vector (TREE_TYPE (type)); + default: + break; } return false;