[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #9 from pinskia at gcc dot gnu dot org 2007-03-27 16:51 --- *** Bug 31373 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||rguenth at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2007-03-13 21:35:15 |2007-03-15 00:38:57 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #6 from pinskia at gcc dot gnu dot org 2007-03-15 01:27 --- Subject: Bug 31165 Author: pinskia Date: Thu Mar 15 01:27:29 2007 New Revision: 122941 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122941 Log: 2007-03-14 Andrew Pinski [EMAIL PROTECTED] PR c++/31165 * call.c (convert_default_arg): Instead of copying the node, unshare it. 2007-03-14 Andrew Pinski [EMAIL PROTECTED] PR C++/31165 * g++.dg/other/default7.C: New test. Added: trunk/gcc/testsuite/g++.dg/other/default7.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #7 from pinskia at gcc dot gnu dot org 2007-03-15 01:31 --- Subject: Bug 31165 Author: pinskia Date: Thu Mar 15 01:31:40 2007 New Revision: 122943 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122943 Log: 2007-03-14 Andrew Pinski [EMAIL PROTECTED] PR c++/31165 * call.c (convert_default_arg): Instead of copying the node, unshare it. 2007-03-14 Andrew Pinski [EMAIL PROTECTED] PR C++/31165 * g++.dg/other/default7.C: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/g++.dg/other/default7.C - copied unchanged from r122941, trunk/gcc/testsuite/g++.dg/other/default7.C Modified: branches/gcc-4_2-branch/gcc/cp/ChangeLog branches/gcc-4_2-branch/gcc/cp/call.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #8 from pinskia at gcc dot gnu dot org 2007-03-15 01:31 --- Fixed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org BugsThisDependsOn||30108 Severity|normal |blocker Component|target |c++ GCC build triplet|i686-pc-linux-gnu | GCC host triplet|i686-pc-linux-gnu | GCC target triplet|powerpc-*-linux-gnu | Summary| Error: symbol |[4.2/4.3 Regression] Error: |`an_empty_string' is already|symbol `an_empty_string' is |defined |already defined Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-03-13 21:11 --- Reducing, I think this was introduced by the patch which fixed PR 30108. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-03-13 21:35 --- Reduced testcase: class string { char *ptr; int len; int sz; }; class cset { } _cset_init; string an_empty_string; void f(string = an_empty_string); void h (void ) { f(); } -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-03-13 21:35:15 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-03-13 21:36 --- I think this only shows up with section anchors. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165
[Bug c++/31165] [4.2/4.3 Regression] Error: symbol `an_empty_string' is already defined
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-03-13 21:40 --- A quick patch which I am testing right now: Index: cp/call.c === --- cp/call.c (revision 122871) +++ cp/call.c (working copy) @@ -4671,7 +4671,7 @@ VAR_DECL. We can avoid the copy for constants, since they are never modified in place. */ if (!CONSTANT_CLASS_P (arg)) - arg = copy_node (arg); + arg = unshare_expr (arg); arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL, default argument, fn, parmnum); arg = convert_for_arg_passing (type, arg); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31165