Commit 39e0656d by Mark Mitchell Committed by Mark Mitchell

optimize.c (initialize_inlined_parameters): Don't set TREE_READONLY for a…

optimize.c (initialize_inlined_parameters): Don't set TREE_READONLY for a VAR_DECL taking the place of an inlined PARM_DECL.

	* optimize.c (initialize_inlined_parameters): Don't set
	TREE_READONLY for a VAR_DECL taking the place of an inlined
	PARM_DECL.

From-SVN: r42480
parent 8d12b800
2001-05-22 Mark Mitchell <mark@codesourcery.com>
* optimize.c (initialize_inlined_parameters): Don't set
TREE_READONLY for a VAR_DECL taking the place of an inlined
PARM_DECL.
2001-05-22 Jason Merrill <jason_merrill@redhat.com> 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
* class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
......
...@@ -498,6 +498,18 @@ initialize_inlined_parameters (id, args, fn) ...@@ -498,6 +498,18 @@ initialize_inlined_parameters (id, args, fn)
DECL_INITIAL (var) = value; DECL_INITIAL (var) = value;
else else
{ {
/* Even if P was TREE_READONLY, the new VAR should not be.
In the original code, we would have constructed a
temporary, and then the function body would have never
changed the value of P. However, now, we will be
constructing VAR directly. The constructor body may
change its value multiple times as it is being
constructed. Therefore, it must not be TREE_READONLY;
the back-end assumes that TREE_READONLY variable is
assigned to only once. */
TREE_READONLY (var) = 0;
/* Build a run-time initialization. */
init_stmt = build_stmt (EXPR_STMT, init_stmt = build_stmt (EXPR_STMT,
build (INIT_EXPR, TREE_TYPE (p), build (INIT_EXPR, TREE_TYPE (p),
var, value)); var, value));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment