From patchwork Wed May 3 14:37:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 68697 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 6F99038560B6 for ; Wed, 3 May 2023 14:37:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id A2CF33858D28 for ; Wed, 3 May 2023 14:37:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2CF33858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BC36622836; Wed, 3 May 2023 14:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1683124627; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FA1Y9IKyVjmPl4oaF0S/EFvBgYkz2Pm0VVLrH5azwk=; b=vyb9BsPccbLNuApUImw4m1AyRRNpRPt86Mj2UHSSFgMYJc7XrKVuNA3if9Tuq9tp3eGkjc zBuR8NRh+b7+T/psDx/uHc+/UW7UNjuGQ3dKD61518N6h4k4Y1Zw+nuf2E3qBKmXmW7Nat fyakZf8r2NmoGbewYa93dUlfCpRFvXM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1683124627; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FA1Y9IKyVjmPl4oaF0S/EFvBgYkz2Pm0VVLrH5azwk=; b=Z4yK02eID7OJEvbh59sjTC4LVoSo8g6Sg98tz+Twr13nZPlB0X7DRX/rPpQ+BQEI1FDapt qmIHU3Vc7Fo0QdBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A6E981331F; Wed, 3 May 2023 14:37:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ATinJ5NxUmQzSQAAMHmgww (envelope-from ); Wed, 03 May 2023 14:37:07 +0000 Message-ID: <0b97cf28-e833-bc0c-28f1-4c6e08a38df7@suse.cz> Date: Wed, 3 May 2023 16:37:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH (pushed)] riscv: fix error: control reaches end of non-void function To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: Jakub Jelinek X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" It's pre-approved by Jakub. Cheers, Martin 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 @@ (define_insn "mem_thread_fence_1" return "fence\tr,rw"; else if (model == MEMMODEL_RELEASE) return "fence\trw,w"; + else + gcc_unreachable (); } [(set (attr "length") (const_int 4))])