From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by sourceware.org (Postfix) with ESMTPS id 28C2B3857C44 for ; Wed, 7 Jul 2021 09:27:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28C2B3857C44 Received: by mail-lf1-f46.google.com with SMTP id r26so2964749lfp.2 for ; Wed, 07 Jul 2021 02:27:20 -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:from:date:message-id:subject:to; bh=lOr2pkI934WDiyXFI7//ee41qu/3bwc9ttOSMKww1ZI=; b=huLtOQHEdudY5DO8f+wkacpjkDY15TBfap18idRt8oRX4+mXXmtf/QYwFx6iqo9So+ GfA1zApr0EVB28jhnTvHlwmm8u/dSCBcHXaWYsKPNj0PYaZraUKivRY5KASF7HvOvOiM +DJGaJ7OP3uJLTqWtKzECO+ziUPJflFLWmH3bhZzK3isnaV0RJn2U2Iw5k+WCPyGUkL6 LVyEQrCspwjponSXQX/l5AY25uSD0Q4Y9mKq0mzPSx46wOxfGWlRqgAuNwZSIXuP3x9u 9VYP5xCsRtpuK43o+reWDYjLlcxvcNyCe4LD4aI8x9zOvaDgLCJGwAR3aPioJsuguCKM e6Fw== X-Gm-Message-State: AOAM533biccV3qxLmZA10KIZMC8YfMxklUT6Jf6if/Zg7UlBdrmcduvi WQXtiUKQf+NFIqwk5Km7q68jMCsaODjHEA== X-Google-Smtp-Source: ABdhPJz1EZ5HtdNs88BPXys/t39/3ntIHUp4Qwx6Gro4a1BoofMPwhjx4KI5DAedTWgY4Xv93QCYAw== X-Received: by 2002:a19:dc5e:: with SMTP id f30mr18529669lfj.318.1625650038574; Wed, 07 Jul 2021 02:27:18 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id j5sm1646724lfe.124.2021.07.07.02.27.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 02:27:18 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id z9so1876388ljm.2 for ; Wed, 07 Jul 2021 02:27:18 -0700 (PDT) X-Received: by 2002:a05:651c:178f:: with SMTP id bn15mr18952906ljb.448.1625650037909; Wed, 07 Jul 2021 02:27:17 -0700 (PDT) MIME-Version: 1.0 From: Erick Ochoa Date: Wed, 7 Jul 2021 11:27:05 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: 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.2 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: Wed, 07 Jul 2021 09:27:22 -0000 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!