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
This commit is contained in:
parent
cc5e9f5a4c
commit
54805e134f
3 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue