diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-07 08:08:27 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-07 08:08:27 +0000 |
commit | 091ffc31d17bc3b5452e648c283d48754d4efbef (patch) | |
tree | 2113fdf3d1c062b5b541d1e6edecc119214043c0 /gcc/ada/gcc-interface/decl.c | |
parent | e1fb2b8149f4cc9ffeda4c2d609e5b253d7c92d8 (diff) | |
download | gcc-091ffc31d17bc3b5452e648c283d48754d4efbef.tar.gz |
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
the expression of a renaming manually in case #3.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234018 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 7ea5ff869e6..4b0ce2824c4 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1058,12 +1058,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) = elaborate_reference (gnu_expr, gnat_entity, definition, &init); - /* If we are not defining the entity, the expression will not - be attached through DECL_INITIAL so it needs to be marked - manually because it will likely be shared. Likewise for a - dereference as it will be folded by the ADDR_EXPR below. */ - if ((!definition || TREE_CODE (renamed_obj) == INDIRECT_REF) - && global_bindings_p ()) + /* The expression needs to be marked manually because it will + likely be shared, even for a definition since the ADDR_EXPR + built below can cause the first few nodes to be folded. */ + if (global_bindings_p ()) MARK_VISITED (renamed_obj); if (type_annotate_only |