From: charlet Date: Tue, 29 Mar 2005 16:23:29 +0000 (+0000) Subject: 2005-03-29 Eric Botcazou X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a57ffd47631db4a59187d09936ba0a25cfe718d2;p=thirdparty%2Fgcc.git 2005-03-29 Eric Botcazou * decl.c (gnat_to_gnu_entity) : Rework comment. * trans.c (tree_transform) : Use correct predicates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97191 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index db806209f70c..9d2e8fe871de 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -776,13 +776,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) } /* Otherwise, make this into a constant pointer to the object we - are to rename. - - Stabilize it since in this case the renaming evaluation may - directly dereference the initial value we make here instead - of the pointer we will assign it to. We don't want variables - in the expression to be evaluated every time the renaming is - used, since their value may change in between. */ + are to rename and attach the object to the pointer. We need + to stabilize too since the renaming evaluation may directly + reference the renamed object instead of the pointer we will + attach it to. We don't want variables in the expression to + be evaluated every time the renaming is used, since their + value may change in between. */ else { bool has_side_effects = TREE_SIDE_EFFECTS (gnu_expr); diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index 10955e352316..fd42e837a2bd 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -410,8 +410,7 @@ Identifier_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p) && (! DECL_RENAMING_GLOBAL_P (gnu_result) || global_bindings_p ()) /* Make sure it's an lvalue like INDIRECT_REF. */ - && (TREE_CODE_CLASS (TREE_CODE (renamed_obj)) == 'd' - || TREE_CODE_CLASS (TREE_CODE (renamed_obj)) == 'r')) + && (DECL_P (renamed_obj) || REFERENCE_CLASS_P (renamed_obj))) gnu_result = renamed_obj; else gnu_result = build_unary_op (INDIRECT_REF, NULL_TREE,