From patchwork Thu Jun 28 10:17:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 936350 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-480709-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NSY7nH6y"; 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 41Gq491gVBz9s19 for ; Fri, 29 Jun 2018 05:05:44 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=rlA5GgULjNtXpJnjDo3GnN5LSVFIPYiXKXOUpwiQJdFXQF+aeylFE t01QZpA+08PYFgABHVX3yLoprv/V0OjNqoTfahduG6e0Fc762znLhQLwm2d8v2Ar x92phKeYnuCBTfUaHq1/yOiz8MIryK2hF2M1AgX3MH9z05P+XHlCG8= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=u727NVziUgd3OpALKQ3Qfo9nsDU=; b=NSY7nH6y5kyC1lFBY4o/ i5o/BoWNLVO/d3ZJp8QLlBYzkRAX87bE/VnxE8OD8yFeDBMxGMnof+65ydiDn7s0 ZafjJXziF1fLYydUFJ7CcrYCaU8275NQzFOJWg3YkWP5nAvE5lf7iSn9wkMYKc0s a80jJvpMrIZ8dpBIV3I3a1k= Received: (qmail 88199 invoked by alias); 28 Jun 2018 19:03:52 -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 88087 invoked by uid 89); 28 Jun 2018 19:03:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.4 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=die_tag X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Jun 2018 19:03:50 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 96B89AD94 for ; Thu, 28 Jun 2018 19:03:45 +0000 (UTC) Date: Thu, 28 Jun 2018 12:17:58 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] gen_subprogram_die followup. Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 This does the is_cu_die->is_unit_die change and also removes the stale comment I forgot to delete when moving the guarded condition. Bootstrapped & tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-06-28 Richard Biener * dwarf2out.c (gen_subprogram_die): Use is_unit_die when deciding whether to not re-use a DIE. Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 262215) +++ gcc/dwarf2out.c (working copy) @@ -22780,7 +22780,7 @@ gen_subprogram_die (tree decl, dw_die_re apply; we just use the old DIE. */ expanded_location s = expand_location (DECL_SOURCE_LOCATION (decl)); struct dwarf_file_data * file_index = lookup_filename (s.file); - if (((is_cu_die (old_die->die_parent) + if (((is_unit_die (old_die->die_parent) /* This condition fixes the inconsistency/ICE with the following Fortran test (or some derivative thereof) while building libgfortran: @@ -22796,9 +22796,6 @@ gen_subprogram_die (tree decl, dw_die_re && old_die->die_parent->die_tag == DW_TAG_module) || context_die == NULL) && (DECL_ARTIFICIAL (decl) - /* The location attributes may be in the abstract origin - which in the case of LTO might be not available to - look at. */ || (get_AT_file (old_die, DW_AT_decl_file) == file_index && (get_AT_unsigned (old_die, DW_AT_decl_line) == (unsigned) s.line)