diff options
author | Jason Merrill <jason@redhat.com> | 2003-08-20 23:20:54 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-08-20 23:20:54 -0400 |
commit | 9eeb200f8a1270e84d0b1c56aa31d5a93e7a3e86 (patch) | |
tree | 4cc303464599d82c38a0015e1eadce58b1248567 /gcc/cp/tree.c | |
parent | e50084fa44cb68c447efc11e53ec16bf09a578c0 (diff) | |
download | gcc-9eeb200f8a1270e84d0b1c56aa31d5a93e7a3e86.zip gcc-9eeb200f8a1270e84d0b1c56aa31d5a93e7a3e86.tar.gz gcc-9eeb200f8a1270e84d0b1c56aa31d5a93e7a3e86.tar.bz2 |
semantics.c (simplify_aggr_init_expr): Split out from simplify_aggr_init_exprs_r.
* semantics.c (simplify_aggr_init_expr): Split out from
simplify_aggr_init_exprs_r. Convert slot address to match
the return type.
* cp-tree.h: Declare it.
* tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
DECL_NAME of a user variable.
From-SVN: r70635
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 64676fd..cd1ea24 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2193,7 +2193,10 @@ cp_copy_res_decl_for_inlining (tree result, /* We have a named return value; copy the name and source position so we can get reasonable debugging information, and register the return variable as its equivalent. */ - if (TREE_CODE (var) == VAR_DECL) + if (TREE_CODE (var) == VAR_DECL + /* But not if we're initializing a variable from the + enclosing function which already has its own name. */ + && DECL_NAME (var) == NULL_TREE) { DECL_NAME (var) = DECL_NAME (nrv); DECL_SOURCE_LOCATION (var) = DECL_SOURCE_LOCATION (nrv); |