From patchwork Tue Jul 25 18:02:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick O'Neill X-Patchwork-Id: 125757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2648239vqg; Tue, 25 Jul 2023 11:11:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcYwwBiIDrQIXsZbPCrLwpCqZzieZzMngUtEmU7wKsYT7VzBGpPm33oTdBHToYwjpQfI9v X-Received: by 2002:a05:6512:230e:b0:4fb:9e1a:e592 with SMTP id o14-20020a056512230e00b004fb9e1ae592mr9817410lfu.4.1690308675305; Tue, 25 Jul 2023 11:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690308675; cv=none; d=google.com; s=arc-20160816; b=yAgCZv2x43Ac0qNR8psoCitZ6lVvV87sSjronZdQQf3w+qXrWCrOH5tBD20pL2Lnfe DRLbL0rCgbFxzuX21odWdcXSgJgx0hEiYpYr6xDa+qxWY/cr8l/+LwARIJjfsse09j6c 3zF89Lft4dMiKLjggHKpKZkWxdVrbi1gt0ae+NSwcBlSeJ5m8iLAE8Ej89yhq6HAu8qk 3zZ+5wTpiMYebAxzNfnWuPBixIWLgQHRkhE52Qjk9FkokqCMn6PxQZXF2UgvxVlD9mJv QQclYikylKKy/kPmeEYcFCUtNDJsWe5jbFet1e6X+Bn0yQp7N4tt3JXFFa7bKPJt5ML2 b6aQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=VQj+neSHhhW+PFkGGxrhNkuyy4DfV1/J7J8VBp/YMaw=; fh=KrAzL9VbHbssA54YahZxozseYre3opzhehecNRsh1vU=; b=g0T3EsO0Jc5QVUHij3Vv3Z6w+Pbx45/XqGBb5ABU1bzr8gcYirhg8r6Ks433zyU3aA ZrlmSkDWXWtGucLfTfkeq7IQHnTt6o1jXf80DhI05dp7e5Bjth2g7L0UXk8ElbDBIrjm COzz1NTY+FVgrAgeD3r4Lo4MocOz+G8mamDcQmsPVDQfPqWijT5EYTqGk3dP5Z5Iqshk Ibky2lvMEbsbx06LUBQu+RzbZvjKKrkR89awXDoKxOAk+6QdHvo4oFHmawqx2a4RLgZg 21DiYTnKjbUVEq+P7HVMN2sMvNFTUEdF4rkwiqsf+YUsNm1VAzRA+ErrPOaa5zm/KAVw O82A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="onP/2LHA"; 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u8-20020aa7d0c8000000b0052257eb6398si444349edo.343.2023.07.25.11.11.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 11:11:15 -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; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="onP/2LHA"; 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 41A633954461 for ; Tue, 25 Jul 2023 18:04:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 32A1F38555A0 for ; Tue, 25 Jul 2023 18:02:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 32A1F38555A0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-563d3e4f73cso387035a12.3 for ; Tue, 25 Jul 2023 11:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1690308159; x=1690912959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VQj+neSHhhW+PFkGGxrhNkuyy4DfV1/J7J8VBp/YMaw=; b=onP/2LHA3WAh8toVRRtIXrsDBJalpu6SEziHlxUtdSV0iARrXJkkoERTgqikTKHAJv 7fo8MvurPtL/vBF6PYYej9GrZyC5yZ0boRaA0DcIK/O+stUvigFA+yGrE/xEccuJYDGj aKOAnnI68+ZfvYOOd3d1jSXY478AGZg1Ath/TQMKHyJI3P/ZQsTcEL5mRH5Pibej6KXF gIIzxhDOCUYgHWf+WVwgqQa5vVT86i9FnsSs//bJUL1J24HUBtiajmXGvdmx/lwwLdKe UZCsz55hkWa52QuZdPXQAsKpDvi336pT7a4+2hNTGEiaAbc53uQjuH2mmEs/cyA0fX5d kFBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690308159; x=1690912959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VQj+neSHhhW+PFkGGxrhNkuyy4DfV1/J7J8VBp/YMaw=; b=cv8AxrGD2OADy5vlmlz62BGADiUEL39+BTKJZ3qf593/NgLr9BQjXAFiAd2NpwTQ4T DfCaxEvRj41THHBLvke3hMgEGGzOH73c5X8Ns7p04DF8a4C7HoQP0HksMiha6l0kLJJx WChGGkCCQaXOjWvdt1AcfR/kt+tQWliz2d7N/G6xijYkfsf54OLluBFJw+W6ZcvYNWvk tUpL6TSqM5OcILvwZzJ36czsUV9ete6VZgwmDoQ87QMcSEyVQ2yRVrkcdJ8XY213pTdr 5TrOvL3vZDpXiauZJdJU+Yup5YepVPWlfHOzaG82T4TyVVV/EIGGCK7Y/LmdFrpBgJ6P AyXw== X-Gm-Message-State: ABy/qLaFkzz4ciZjUt9RFr5ubDvP+yFeUOey2++aAfradMIT9r3vTcXE yJGkQs3pImc9S3Jpd+BkouRzrDiO/Ft5fruSVaY= X-Received: by 2002:a17:90a:2bc7:b0:268:2658:3b01 with SMTP id n7-20020a17090a2bc700b0026826583b01mr3885895pje.39.1690308158882; Tue, 25 Jul 2023 11:02:38 -0700 (PDT) Received: from patrick-ThinkPad-X1-Carbon-Gen-8.hq.rivosinc.com ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id p1-20020a1709028a8100b001b3ce619e2esm11283352plo.179.2023.07.25.11.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 11:02:38 -0700 (PDT) From: Patrick O'Neill To: gcc-patches@gcc.gnu.org Cc: jeffreyalaw@gmail.com, palmer@rivosinc.com, vineetg@rivosinc.com, andrew@sifive.com, kito.cheng@sifive.com, dlustig@nvidia.com, cmuellner@gcc.gnu.org, andrea@rivosinc.com, hboehm@google.com, Martin Liska Subject: [gcc13 backport 12/12] riscv: fix error: control reaches end of non-void function Date: Tue, 25 Jul 2023 11:02:06 -0700 Message-Id: <20230725180206.284777-13-patrick@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725180206.284777-1-patrick@rivosinc.com> References: <20230427162301.1151333-1-patrick@rivosinc.com> <20230725180206.284777-1-patrick@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 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=unavailable 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: INBOX X-GMAIL-THRID: 1772417109307697017 X-GMAIL-MSGID: 1772417109307697017 From: Martin Liska Fixes: gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] 66 | [(set (attr "length") (const_int 4))]) | ^ PR target/109713 gcc/ChangeLog: * config/riscv/sync.md: Add gcc_unreachable to a switch. --- gcc/config/riscv/sync.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/riscv/sync.md b/gcc/config/riscv/sync.md index 6e7c762ac57..9fc626267de 100644 --- a/gcc/config/riscv/sync.md +++ b/gcc/config/riscv/sync.md @@ -62,6 +62,8 @@ return "fence\tr,rw"; else if (model == MEMMODEL_RELEASE) return "fence\trw,w"; + else + gcc_unreachable (); } [(set (attr "length") (const_int 4))])