From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Mitchell To: dave@hiauly1.hia.nrc.ca Cc: law@cygnus.com, gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: C++ Issue on GCC 3.0 branch Date: Wed, 25 Apr 2001 17:31:00 -0000 Message-id: <20010425173144F.mitchell@codesourcery.com> References: <20010425102616D.mitchell@codesourcery.com> <200104252104.RAA15761@hiauly1.hia.nrc.ca> X-SW-Source: 2001-04/msg01259.html After making Dave work hard sending me lots of information, it turns out that his original patch is exactly the right thing. I checked in the attached, on both the mainline and the branch; hopefully it will remove the duplicate symbols on HPUX. Tested on i686-pc-linux-gnu, and by looking at the .s output for Dave's testcase. Thanks, -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com 2001-04-25 Mark Mitchell * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting the clone. Index: optimize.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/optimize.c,v retrieving revision 1.51.2.13 diff -c -p -r1.51.2.13 optimize.c *** optimize.c 2001/04/25 00:12:47 1.51.2.13 --- optimize.c 2001/04/26 00:28:07 *************** maybe_clone_body (fn) *** 1051,1056 **** --- 1051,1057 ---- DECL_EXTERNAL (clone) = DECL_EXTERNAL (fn); DECL_INTERFACE_KNOWN (clone) = DECL_INTERFACE_KNOWN (fn); DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn); + TREE_PUBLIC (clone) = TREE_PUBLIC (fn); /* Start processing the function. */ push_to_top_level ();