From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24884 invoked by alias); 13 Jun 2006 21:47:26 -0000 Received: (qmail 24867 invoked by uid 22791); 13 Jun 2006 21:47:26 -0000 X-Spam-Check-By: sourceware.org Received: from bethe.phy.uc.edu (HELO physics.uc.edu) (129.137.4.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 Jun 2006 21:47:24 +0000 Received: from earth.geop.uc.edu (earth.phy.uc.edu [10.44.11.234]) by physics.uc.edu (8.13.6/8.13.4) with ESMTP id k5DLlKxd006725; Tue, 13 Jun 2006 17:47:21 -0400 Received: from earth.phy.uc.edu (localhost.localdomain [127.0.0.1]) by earth.geop.uc.edu (8.12.11/8.9.3) with ESMTP id k5DLlKJq031558; Tue, 13 Jun 2006 17:47:20 -0400 Received: (from pinskia@localhost) by earth.phy.uc.edu (8.12.11/8.12.11/Submit) id k5DLlKE4031557; Tue, 13 Jun 2006 17:47:20 -0400 From: Andrew Pinski Message-Id: <200606132147.k5DLlKE4031557@earth.phy.uc.edu> Subject: Re: [Bug c++/28017] lack of guard variables for explicitly instantiated template static data To: gcc-bugzilla@gcc.gnu.org Date: Tue, 13 Jun 2006 21:47:00 -0000 Cc: gcc-bugs@gcc.gnu.org In-Reply-To: <20060613214116.21495.qmail@sourceware.org> X-Mailer: ELM [version 2.5 PL7] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -2.372 () ALL_TRUSTED,UPPERCASE_25_50 X-IsSubscribed: yes Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg01323.txt.bz2 List-Id: > > > > ------- Comment #7 from hhinnant at apple dot com 2006-06-13 21:41 ------- > (In reply to comment #6) > > Subject: Re: lack of guard variables for explicitly instantiated template > > static data > > > > > #define NEEDS_GUARD_P(decl) (TREE_PUBLIC (decl) && (DECL_COMMON (decl) \ > > > || DECL_ONE_ONLY (decl) \ > > > || DECL_WEAK (decl) \ > > > || > > > (!TARGET_WEAK_NOT_IN_ARCHIVE_TOC \ > > > || (! DECL_EXPLICIT_INSTANTIATION (decl) \ > > > && ! DECL_TEMPLATE_SPECIALIZATION (decl))))) > > > > > > ? > > > > The latter. > > Thanks. But this doesn't pass the test case on darwin. I'm not familiar > enough with the C++ FE to understand TARGET_WEAK_NOT_IN_ARCHIVE_TOC. Could you > double check the above. The "!" in front of DECL_EXPLICIT_INSTANTIATION looks > especially suspicious to me. You want the opposite of that like: (TARGET_WEAK_NOT_IN_ARCHIVE_TOC && (DECL_EXPLICIT_INSTANTIATION (decl) || DECL_TEMPLATE_SPECIALIZATION (decl))) I was quoting the case when DECL_WEAK would be set on the decl. TARGET_WEAK_NOT_IN_ARCHIVE_TOC is only defined to 1 for darwin. -- Pinski