From patchwork Fri Aug 21 15:17:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1349325 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BY4r73DMmz9sPf for ; Sat, 22 Aug 2020 01:17:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C20C13851C26; Fri, 21 Aug 2020 15:17:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 152CA3857C43 for ; Fri, 21 Aug 2020 15:17:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 152CA3857C43 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: 3BRPZUnk7QPAiV5Y/b1MvnjP05lFwMqWLalUd4QZlz1r228+VgAzfuaw+tSPrnub5x2sLgs8DO 4iq+nhYYb+JlbtmPVYDNDZtPt3L+NjUUb/3DfcN+kfjfw0lJlf3l5ud2VZzXSA7NofjOG4Vomu JBWYhnzr2ItTiJ2qM4sq9N2KBJO6RqhO/F5x0/+Yj09CBXRZAafB9SV7euCiLZ8aUZws1u76X1 TGEU9hmah0EOhRTNDieaiUdUIxx2j2p/gTA6QuIMylCIwIZJCDYO8j2gi8Duh5Eib6i4pPhKeE KpE= X-IronPort-AV: E=Sophos;i="5.76,337,1592899200"; d="diff'?scan'208";a="52261824" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 21 Aug 2020 07:17:03 -0800 IronPort-SDR: eecV09psTwupm0dYCNC0oTZBZk1NyDEg6LmantRZVcBWsMV5KPlEnIwu5PijP3pAQ6TqjBMiRP frNsZEYNmuKMXCKUKEQMUeFNP/EpMb706E93Q9LQf+XKuT2CxO07u/UK0/5TQfDRzWE1nRKf16 zaBMqG6lc9WAKHq1aupTaJBqs9aDboOX/GqSz8lIRcJO9Zg6iU2MAF1WNsm/5SxEGJazTZM3Ug HF1VGZePCd9H185hdetRCssCxb//XIjMvgLsYI6UL6dqV/La07PeXyG3ubFud6ApSmoaNc8tcI G6Q= To: gcc-patches From: Tobias Burnus Subject: [GCC 10][patch, committed] Backported: [LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320) Message-ID: <935d8c06-ca2d-f6fe-3da3-bf5f45bc5a68@codesourcery.com> Date: Fri, 21 Aug 2020 17:17:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-06.mgc.mentorg.com (139.181.222.6) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.5 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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@gcc.gnu.org Sender: "Gcc-patches" Seemingly, the patch which caused this made it now to GCC 10; at least it fails now with offloading on the OG10 branch, after merging the trunk into that branch. Hence, I committed this to GCC 10 to avoid this ICE. It occurs here for libgomp.c/../libgomp.c-c++-common/reduction-16.c when compiling with '-fopenmp' for offloading (when offloading is configured). Committed my patch as obvious :-) I also merged GCC 10 into OG10 to have it there as well. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter commit 2974c828615b240f66b208301b5a73c6a07fcb22 Author: Tobias Burnus Date: Tue May 26 18:24:28 2020 +0200 [LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320) gcc/ChangeLog: PR ipa/95320 * ipa-utils.h (odr_type_p): Also permit calls with only flag_generate_offload set. (cherry picked from commit c5ab336ba106a407a67e84d8faac5b0ea6f18310) diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 6597593d138..178c2cbe446 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -245,7 +245,7 @@ odr_type_p (const_tree t) { /* We do not have this information when not in LTO, but we do not need to care, since it is used only for type merging. */ - gcc_checking_assert (in_lto_p || flag_lto); + gcc_checking_assert (in_lto_p || flag_lto || flag_generate_offload); return TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t)); }