This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ Issue on GCC 3.0 branch
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 <mark@codesourcery.com>
* 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 ();