Commit 54805e13 by Richard Kenner Committed by Richard Kenner

trans.c (add_decl_expr): Clear TREE_READONLY if clear DECL_INITIAL.

	* trans.c (add_decl_expr): Clear TREE_READONLY if clear DECL_INITIAL.
	* utils.c (unchecked_convert): Don't do two VIEW_CONVERT_EXPRs.

From-SVN: r84742
parent cc5e9f5a
Wed Jul 14 23:16:59 2004 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* trans.c (add_decl_expr): Clear TREE_READONLY if clear DECL_INITIAL.
* utils.c (unchecked_convert): Don't do two VIEW_CONVERT_EXPRs.
2004-07-14 Andreas Schwab <schwab@suse.de>
* trans.c (gnat_init_stmt_group): Remove duplicate definition.
......
......@@ -4164,6 +4164,7 @@ add_decl_expr (tree gnu_decl, Entity_Id gnat_entity)
gnu_lhs, DECL_INITIAL (gnu_decl));
DECL_INITIAL (gnu_decl) = 0;
TREE_READONLY (gnu_decl) = 0;
annotate_with_locus (gnu_assign_stmt,
DECL_SOURCE_LOCATION (gnu_decl));
add_stmt (gnu_assign_stmt);
......
......@@ -3224,6 +3224,11 @@ unchecked_convert (tree type, tree expr, int notrunc_p)
else
{
expr = maybe_unconstrained_array (expr);
/* There's no point in doing two unchecked conversions in a row. */
if (TREE_CODE (expr) == VIEW_CONVERT_EXPR)
expr = TREE_OPERAND (expr, 0);
etype = TREE_TYPE (expr);
expr = build1 (VIEW_CONVERT_EXPR, type, expr);
}
......
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