Commit 0c3b8d13 by Richard Kenner Committed by Richard Kenner

fold-const.c (fold_addr_expr_with_type): Look through all valid LHS modifiers to…

fold-const.c (fold_addr_expr_with_type): Look through all valid LHS modifiers to find a base to mark addressable.

	* fold-const.c (fold_addr_expr_with_type): Look through all
	valid LHS modifiers to find a base to mark addressable.

From-SVN: r83628
parent 61a36b9b
2004-06-24 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2004-06-24 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* fold-const.c (fold_addr_expr_with_type): Look through all
valid LHS modifiers to find a base to mark addressable.
* tree.h (debug_find_tree): Add declaration. * tree.h (debug_find_tree): Add declaration.
* tree-inline.c (debug_find_tree): Remove extern declaration. * tree-inline.c (debug_find_tree): Remove extern declaration.
......
...@@ -10420,8 +10420,10 @@ build_fold_addr_expr_with_type (tree t, tree ptrtype) ...@@ -10420,8 +10420,10 @@ build_fold_addr_expr_with_type (tree t, tree ptrtype)
else else
{ {
tree base = t; tree base = t;
while (TREE_CODE (base) == COMPONENT_REF
|| TREE_CODE (base) == ARRAY_REF) while (handled_component_p (base)
|| TREE_CODE (base) == REALPART_EXPR
|| TREE_CODE (base) == IMAGPART_EXPR)
base = TREE_OPERAND (base, 0); base = TREE_OPERAND (base, 0);
if (DECL_P (base)) if (DECL_P (base))
TREE_ADDRESSABLE (base) = 1; TREE_ADDRESSABLE (base) = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment