aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2007-03-15 01:27:29 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2007-03-14 18:27:29 -0700
commit344bd5a86133fcdff69396d9cc526317630c0f70 (patch)
tree40387ede534231616a096b2529605fffa90afb24 /gcc/cp/call.c
parent22cbc70726b96dbdc4b5fee428af20843423190a (diff)
downloadgcc-344bd5a86133fcdff69396d9cc526317630c0f70.zip
gcc-344bd5a86133fcdff69396d9cc526317630c0f70.tar.gz
gcc-344bd5a86133fcdff69396d9cc526317630c0f70.tar.bz2
re PR c++/31165 (Error: symbol `an_empty_string' is already defined)
2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com> PR c++/31165 * call.c (convert_default_arg): Instead of copying the node, unshare it. 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com> PR C++/31165 * g++.dg/other/default7.C: New test. From-SVN: r122941
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 53129bb..9d25298 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4683,7 +4683,7 @@ convert_default_arg (tree type, tree arg, tree fn, int parmnum)
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);