From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by sourceware.org (Postfix) with ESMTPS id 7CBA33858D39 for ; Fri, 9 Jul 2021 07:51:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7CBA33858D39 Received: by mail-lj1-f181.google.com with SMTP id s18so6656039ljg.7 for ; Fri, 09 Jul 2021 00:51:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Xj/i4HoswuMh7yb9x3RsR1exaYxWY/ZarVClPdx8QNc=; b=amHrhTLfWcqvTYX3Vk33ueFdw15fYdxBLJStgcQczT6F4mcPg/ZUHlM5tJl+ymIcne LwbLi8junGiql+PVBJFnAj3bGiRcxfSJIK4B2EFfg95KR3w+CO/PbA5+GRmmdTR6gcxL fk7ME3UPNpnMgjIkjYXp40uPAZ3oCcWXrn8t+X9KTJP9VQAWomATYghCULk/2lotDLFt IiSZH/oe/XCjzOVCib7mKml4g7MBRlDlV7shTiOZWZyXZqgRTh0kCIeIEJwmvZE3f5oA y+CHZ8LUUHbUBcYteqZdVe9+vjrjsOrVUwGHUJiAIfrup4X4VK6hHZpj1nvKtC4AJX7I sjpw== X-Gm-Message-State: AOAM53297dAyU+MAJACN+IorDQtLQmKoBDRMXSkoPSXug0muZVgVadr5 yP8xNSYrhKAgtwqxxmPrIwe7to9sxkciSg== X-Google-Smtp-Source: ABdhPJzL580Lem9xNooBW9qoAU/hbJFP8ezQR2dKAIOY3NigiLavmTnk/BJeAxLY0dtZavY+Afe3cg== X-Received: by 2002:a2e:8146:: with SMTP id t6mr17167052ljg.248.1625817073939; Fri, 09 Jul 2021 00:51:13 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id w29sm427792lfu.160.2021.07.09.00.51.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jul 2021 00:51:13 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id s18so6655996ljg.7 for ; Fri, 09 Jul 2021 00:51:13 -0700 (PDT) X-Received: by 2002:a2e:7010:: with SMTP id l16mr6721283ljc.375.1625817073382; Fri, 09 Jul 2021 00:51:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Erick Ochoa Date: Fri, 9 Jul 2021 09:51:02 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: tree decl stored during LGEN does not map to a symtab_node during WPA To: gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2021 07:51:16 -0000 Hi, I noticed this is also happening also for local variables. Again, storing tree declarations on a summary during LGEN and then at WPA time reading from those summaries. I can print the declaration, but when I try to look for its node in the symtab I get NULL as the return value. Any help is appreciated. Thanks! On Wed, 7 Jul 2021 at 11:27, Erick Ochoa wrote: > > Hi, > > I am saving some tree declarations during LGEN that I will be later > analyzing at WPA time. I am able to read the decl from my summaries > and print it at WPA time. It corresponds to a global variable. > However, whenever I use symtab_node::get (decl) during WPA time I keep > getting NULL. > > Does anyone know why that might be the case? Is it possible that other > optimizations are rewriting global variables during LGEN (or prior > WPA)? The variable I am looking at is a static const char typeinfo > name for a class in the program I am analyzing. I don't think this is > an issue since other type info names have an associated symtab_node. > > Thanks!