From patchwork Fri Feb 4 10:41:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1588372 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=dz3KGSKf; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JqsXn5wDVz9s5B for ; Fri, 4 Feb 2022 21:41:44 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9670B385840A for ; Fri, 4 Feb 2022 10:41:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9670B385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1643971301; bh=ZvQB3DPSeqpA8KM96z+SPLvuKCaf64rtj7fHRX6hRCw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dz3KGSKfLB5Bf6d1DrbPU5p1DIoBFVD0IgAMV4WK8kO+UFpfgQWG+Mmbw59592tGU biOPYWZTLe2kLoJD3MAL7KGuZB/RNgJuW/ObVSd2Hu5Kw+a11xuQSFimasMd2duMtH y/+QT3lcG6wMZsZ7M7dgJId/N6xGV/z6IwfrZWEI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 7C6173858D20 for ; Fri, 4 Feb 2022 10:41:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C6173858D20 Received: by mail-wr1-x42a.google.com with SMTP id f17so10511762wrx.1 for ; Fri, 04 Feb 2022 02:41:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZvQB3DPSeqpA8KM96z+SPLvuKCaf64rtj7fHRX6hRCw=; b=InCFqqhu6OCcGn/sSxeQKwe62a1uZo0gyidK1mwRM4lDP3GACnQd5pHx7cjHsScf0b gQ43Xn2AaYnQatBqVB34vNGEgk9F4jg4+j7kkuUFeHnKPJY14NdqR1wQCMYon5JTh4/y OlC9Om1fAMYHVD9v6Cy812e9tDlNfFUWWlsULbrn7J0xmFhWCMQx9WAvl78B5E4hVcef wGz5NrgJwbkKsv8Ma15zIc6d4fHIJYaCHaAIEzFsJFtKwsznLTjzcfRuva/jx4NlT2Nm kEWVGteYXNSWPPXY7CJEG+sBZkZVS9sxWC7ImPhh255zB9cJZ9go0IalH2HCxeyL+SYS C19A== X-Gm-Message-State: AOAM532lKKeOMero00/Sk1ACo1FwfO551ba61lkZ8hFQkiSRz5q0BIj0 kvmceNNYWHjLQbe53JJUxGEKJO0PSrpxUg== X-Google-Smtp-Source: ABdhPJwZnP/bYwRGKsiQwQdfvFPbgTpyCYdpIUv+Hlm+fuECwRlXKcvnIlkX/uxShJlfW4tLps/WLA== X-Received: by 2002:a5d:4081:: with SMTP id o1mr1914998wrp.52.1643971280548; Fri, 04 Feb 2022 02:41:20 -0800 (PST) Received: from fomalhaut.localnet ([2a01:e0a:41b:84f0:cf71:f5e0:b050:bede]) by smtp.gmail.com with ESMTPSA id f13sm1659174wri.44.2022.02.04.02.41.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 02:41:19 -0800 (PST) X-Google-Original-From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [patch] Fix PR debug/104366 Date: Fri, 04 Feb 2022 11:41:19 +0100 Message-ID: <3337856.QJadu78ljV@fomalhaut> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: , X-Patchwork-Original-From: Eric Botcazou via Gcc-patches From: Eric Botcazou Reply-To: Eric Botcazou Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, this completes my fix for PR debug/101947 by emptying the base_types vector before (re)populating it. Tested on x86_64-suse-linux, OK for the mainline? 2022-02-04 Eric Botcazou PR debug/104366 * dwarf2out.cc (dwarf2out_finish): Empty base_types. (dwarf2out_early_finish): Likewise. diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index e60575b1398..d1e8654e4d7 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -32155,6 +32155,7 @@ dwarf2out_finish (const char *filename) FOR_EACH_CHILD (die, c, gcc_assert (! c->die_mark)); } #endif + base_types.truncate (0); for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next) resolve_addr (ctnode->root_die); resolve_addr (comp_unit_die ()); @@ -32999,6 +33000,7 @@ dwarf2out_early_finish (const char *filename) location related output removed and some LTO specific changes. Some refactoring might make both smaller and easier to match up. */ + base_types.truncate (0); for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next) mark_base_types (ctnode->root_die); mark_base_types (comp_unit_die ());