From patchwork Thu Nov 8 14:58:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 994946 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489396-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="DEM476d8"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rRJC4wpYz9sBN for ; Fri, 9 Nov 2018 01:59:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=vN1gAsfvWetYz0Yd CzwnDtPtS1moqvIcSNxSUMEL2YL1h/yk2LwocJZp4fUwsdPme19rCqpgCOYooyLT ciuEyK7qoKniADTS74jF37rVOf0jUu1JK3B29RWbS6kNIeBoeg4RLRVAK4Y5xRDV NUIaTbo7x21Rnrrd482iZVKYeBo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=X928T7ABAwt/tSLh4HSCAq y+sfQ=; b=DEM476d8dt9Wnas8Sn/+dWrqFXQYAJOVr/AuXJDIwwz5dYZiFEitHS eHy3WuMj9yAKeBDHoaFdetlTov5b3CD5m0K0fT3Y218MT7GkuVZiphojcDeryxc/ Lfdv/RuQ2YZ1qR8b8xd5q4k9p3gbl3/t3YrPl1xvHX/FOh2vc6CL8= Received: (qmail 22431 invoked by alias); 8 Nov 2018 14:58:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 22400 invoked by uid 89); 8 Nov 2018 14:58:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=265866 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Nov 2018 14:58:56 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 95B90818CC for ; Thu, 8 Nov 2018 15:58:54 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tti-tGcFv4Ga for ; Thu, 8 Nov 2018 15:58:54 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 7526881368 for ; Thu, 8 Nov 2018 15:58:54 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR middle-end/87916 Date: Thu, 08 Nov 2018 15:58:52 +0100 Message-ID: <1719808.xBNmrKsvZy@polaris> MIME-Version: 1.0 Since expand_thunk no longer overrides the DECL_IGNORED_P setting on the thunk from the front-end in every case, duplicate_thunk_for_node may create a new thunk without DECL_IGNORED_P set and this doesn't play with inlining and early debug info generation; fixed by forcing DECL_IGNORED_P as before in this case. Bootstrapped/regtested on x86-64/Linux, applied on the mainline as obvious. 2018-11-08 Eric Botcazou PR middle-end/87916 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P. 2018-11-08 Eric Botcazou * g++.dg/other/pr87916.C: New test. Index: cgraphclones.c =================================================================== --- cgraphclones.c (revision 265866) +++ cgraphclones.c (working copy) @@ -321,6 +321,10 @@ duplicate_thunk_for_node (cgraph_node *t "artificial_thunk"); SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); + /* We need to force DECL_IGNORED_P because the new thunk is created after + early debug was run. */ + DECL_IGNORED_P (new_decl) = 1; + new_thunk = cgraph_node::create (new_decl); set_new_clone_decl_and_node_flags (new_thunk); new_thunk->definition = true;