From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26836 invoked by alias); 18 May 2002 04:46:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26762 invoked by uid 71); 18 May 2002 04:46:02 -0000 Date: Fri, 17 May 2002 21:46:00 -0000 Message-ID: <20020518044602.26734.qmail@sources.redhat.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jason Merrill Subject: Re: c++/6611: [PATCH] Non-weak emission of `std::__default_alloc_template[...]' on platform(s) where it should be weak Reply-To: Jason Merrill X-SW-Source: 2002-05/txt/msg00536.txt.bz2 List-Id: The following reply was made to PR c++/6611; it has been noted by GNATS. From: Jason Merrill To: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: bkoz@redhat.com, gcc-bugs@gcc.gnu.org, ljrittle@acm.org, pfeifer@dbai.tuwien.ac.at Subject: Re: c++/6611: [PATCH] Non-weak emission of `std::__default_alloc_template[...]' on platform(s) where it should be weak Date: Sat, 18 May 2002 05:42:33 +0100 --=-=-= We clear DECL_EXTERNAL when we start to define a function. In this case when we were supposed to clear it again, it was already referenced, so DECL_NEEDED_P was true, so we ended up emitting it even though import_export_decl tried to suppress it. Yet another ugly tweak to the C++ linkage morass. I'll get back to work on the rewrite RSN. Tested i686-pc-linux-gnu, applied to trunk. I'll come up with a testcase soon, but I want to get this in now so it stops interfering with libstdc++ work. 2002-05-18 Jason Merrill * decl2.c (import_export_decl): If we clear DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. --=-=-= Content-Type: text/x-patch Content-Disposition: inline *** decl2.c.~1~ Thu May 16 05:52:12 2002 --- decl2.c Fri May 17 22:59:52 2002 *************** import_export_decl (decl) *** 2481,2487 **** comdat_linkage (decl); } else ! DECL_NOT_REALLY_EXTERN (decl) = 0; } else if (DECL_FUNCTION_MEMBER_P (decl)) { --- 2481,2490 ---- comdat_linkage (decl); } else ! { ! DECL_EXTERNAL (decl) = 1; ! DECL_NOT_REALLY_EXTERN (decl) = 0; ! } } else if (DECL_FUNCTION_MEMBER_P (decl)) { *************** import_export_decl (decl) *** 2497,2502 **** --- 2500,2508 ---- && ! flag_implement_inlines && !DECL_VINDEX (decl))); + if (!DECL_NOT_REALLY_EXTERN (decl)) + DECL_EXTERNAL (decl) = 1; + /* Always make artificials weak. */ if (DECL_ARTIFICIAL (decl) && flag_weak) comdat_linkage (decl); --=-=-=--