From patchwork Fri Oct 1 17:10:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 45707 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 44C9E3857407 for ; Fri, 1 Oct 2021 17:14:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 7A959385742C for ; Fri, 1 Oct 2021 17:10:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A959385742C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: FmLmNgDZ5oqAoLLtju7YJukxrUlME1ivKMMjhVXeRmPCzXrAeFXt0IID2abU7uKDiMlbCn0u2R QNqKbHKatWZT7gTq+fBwz3ATpj7Q0Gi+oDsS6Ekz3iiZC+NKnujIUd6HtAOwWrQtqddhLmzCP0 DM2ZK3Xj/eMDIGQofoPEl7kMrLDLfAlSHBgoIsffyrvkVCXRd2oi4cI6WaF4S1pZrM7W0wgN2I ATG8y7W6nQyTfhJERx0/rfSO9Mql0MUg3PTnQRIWrsXv5gH7I9SXF/MzRujHpZO4ZzSK0zcQPW sPfAdj9xnEaJbXlomvUJc6NV X-IronPort-AV: E=Sophos;i="5.85,339,1624348800"; d="scan'208";a="66622524" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 01 Oct 2021 09:10:20 -0800 IronPort-SDR: oLDiX+FSc9EM9T1qBPncyMZVKnbt3No/oQJlxiUubbuvDbAw+ZCBsSKK+W59CSr9cSfNWUdaK6 qDQXA8OUp4Gk3RdgibhFyETGLKfY4TWYMZ5q5YfAK9OnLBBvZxFV0SoyjCNgTnucF0ZfuQSKS1 ZCt2d7gkekFG09tDP4UUoXLCKU4i2IBHBTWjQ8Hw58QJbdh2bHQyCyO+UXi/e3/Ez1EAU0NTEY dLtt5kgZjliQgly91I6OLKgXvntNNnoOaWYjyc21Zk0qU2xgOQwq2t8pSBaIPGro8GpwKh4+cb OYk= From: Julian Brown To: Subject: [PATCH 11/11] OpenMP/OpenACC: [WIP] Add gcc_unreachable to apparently-dead path in build_struct_comp_nodes Date: Fri, 1 Oct 2021 10:10:09 -0700 Message-ID: <8bca087d3bfa223fc8413e7b0cc7e5294dfe4b64.1633106213.git.julian@codesourcery.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Cc: Jakub Jelinek , Thomas Schwinge Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" The previous "not for committing" taxonomy patch shows that the path handling "extra nodes" in build_struct_comp_nodes is probably now dead, at least across the current testsuite. This patch adds gcc_unreachable on that path: this passes testing, which suggests that the extra node handling can probably be removed completely. (Otherwise we need test coverage for that path, ideally!) This is mostly posted as an FYI: a real patch would probably just remove the unused code path, if it really isn't needed any more. Thanks, Julian 2021-09-29 Julian Brown gcc/ * gimplify.c (build_struct_comp_nodes): Add gcc_unreachable on code path that appears to now be unused. --- gcc/gimplify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/gimplify.c b/gcc/gimplify.c index d9fda21413d..3d444d1836f 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -8625,6 +8625,9 @@ build_struct_comp_nodes (enum tree_code code, tree grp_start, tree grp_end, OMP_CLAUSE_SIZE (c3) = TYPE_SIZE_UNIT (ptr_type_node); OMP_CLAUSE_CHAIN (c3) = NULL_TREE; + /* Apparently? */ + gcc_unreachable (); + *extra_node = c3; } else