This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Remove bogus usage of TREE_ADDRESSABLE in tree.h
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 May 2010 21:25:37 +0200
- Subject: Remove bogus usage of TREE_ADDRESSABLE in tree.h
This reads:
In a FIELD_DECL node, it means that the programmer is permitted to
construct the address of this field. This is used for aliasing
purposes: see record_component_aliases.
That's bogus, the above description is that of DECL_NONADDRESSABLE_P (or
rather that of its opposite). There is no reference to TREE_ADDRESSABLE in
record_component_aliases. Moreover mark_addressable is explicit:
void
mark_addressable (tree x)
{
while (handled_component_p (x))
x = TREE_OPERAND (x, 0);
if (TREE_CODE (x) != VAR_DECL
&& TREE_CODE (x) != PARM_DECL
&& TREE_CODE (x) != RESULT_DECL)
return ;
TREE_ADDRESSABLE (x) = 1;
}
Applied on the mainline as obvious.
2010-05-14 Eric Botcazou <ebotcazou@adacore.com>
* tree.h (TREE_ADDRESSABLE): Remove bogus usage for FIELD_DECL.
--
Eric Botcazou
Index: tree.h
===================================================================
--- tree.h (revision 159211)
+++ tree.h (working copy)
@@ -411,8 +411,7 @@ struct GTY(()) tree_common {
addressable_flag:
TREE_ADDRESSABLE in
- VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, FIELD_DECL
- LABEL_DECL
+ VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, LABEL_DECL
all types
CONSTRUCTOR, IDENTIFIER_NODE
STMT_EXPR, it means we want the result of the enclosed expression
@@ -1111,9 +1110,6 @@ extern void omp_clause_range_check_faile
of this is needed. So it cannot be in a register.
In a FUNCTION_DECL, nonzero means its address is needed.
So it must be compiled even if it is an inline function.
- In a FIELD_DECL node, it means that the programmer is permitted to
- construct the address of this field. This is used for aliasing
- purposes: see record_component_aliases.
In CONSTRUCTOR nodes, it means object constructed must be in memory.
In LABEL_DECL nodes, it means a goto for this label has been seen
from a place outside all binding contours that restore stack levels.