diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-18 18:31:42 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-18 18:31:42 +0000 |
commit | d26f72dff0ded406c1773432d0fcedf6aff0b0ab (patch) | |
tree | f9406b1c7cb09d095c6b70103d1e989127905810 /gcc/ada/gcc-interface/decl.c | |
parent | f20739b0e1303794f5b1c8b81530c91f7af02032 (diff) |
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use case #1
for the renaming of an address.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index ceeb9958617b..883b2755df45 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -963,8 +963,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) function call is a constant object. Therefore, it can be the inner object of a constant renaming and the renaming must be fully instantiated, i.e. it cannot be a reference to (part of) - an existing object. And treat null expressions, constructors - and literals the same way. */ + an existing object. And treat other rvalues (addresses, null + expressions, constructors and literals) the same way. */ tree inner = gnu_expr; while (handled_component_p (inner) || CONVERT_EXPR_P (inner)) inner = TREE_OPERAND (inner, 0); @@ -974,6 +974,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) inner = TREE_OPERAND (inner, 1); if ((TREE_CODE (inner) == CALL_EXPR && !call_is_atomic_load (inner)) + || TREE_CODE (inner) == ADDR_EXPR || TREE_CODE (inner) == NULL_EXPR || TREE_CODE (inner) == CONSTRUCTOR || CONSTANT_CLASS_P (inner)) |