diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-04-28 20:52:31 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-04-28 16:52:31 -0400 |
commit | c083cf9a099343f58cdd2b33203052c74ed2f8fa (patch) | |
tree | 325e0828ffaa01699dcdae4745ec16e0f53644bf /gcc/cp | |
parent | e67cd9f80dd021af3fcf9595b39e2e31864572d4 (diff) | |
download | gcc-c083cf9a099343f58cdd2b33203052c74ed2f8fa.zip gcc-c083cf9a099343f58cdd2b33203052c74ed2f8fa.tar.gz gcc-c083cf9a099343f58cdd2b33203052c74ed2f8fa.tar.bz2 |
tree.c (get_callee_fndecl): Extract the initial value from a readonly decl.
* tree.c (get_callee_fndecl): Extract the initial value from
a readonly decl.
* cp/optimize.c (initialize_inlined_parameters): Call
c_apply_type_quals_to_decl. Set DECL_INITIAL.
From-SVN: r33518
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c556a21..7f96445 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-04-28 Jason Merrill <jason@casey.cygnus.com> + + * optimize.c (initialize_inlined_parameters): Call + c_apply_type_quals_to_decl. Set DECL_INITIAL. + 2000-04-27 Mark Mitchell <mark@codesourcery.com> * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 9863d4a..39f8247 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -419,6 +419,8 @@ initialize_inlined_parameters (id, args, fn) /* Make an equivalent VAR_DECL. */ var = copy_decl_for_inlining (p, fn, VARRAY_TREE (id->fns, 0)); + c_apply_type_quals_to_decl (TYPE_QUALS (p), var); + /* Register the VAR_DECL as the equivalent for the PARM_DECL; that way, when the PARM_DECL is encountered, it will be automatically replaced by the VAR_DECL. */ @@ -430,6 +432,8 @@ initialize_inlined_parameters (id, args, fn) this will not result in an extra copy: the TARGET_EXPR representing the argument will be bound to VAR, and the object will be constructed in VAR. */ + if (! TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (p))) + DECL_INITIAL (var) = TREE_VALUE (a); init_stmt = build_min_nt (EXPR_STMT, build (INIT_EXPR, TREE_TYPE (p), var, value)); |