aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2012-10-16 22:49:07 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-10-16 22:49:07 +0000
commit88d8330d67ec17569e4b7e52989934bf6908a1f0 (patch)
tree01d1822515deb56bf92d32e9ff0cc1bcea39dc1b /gcc/gimplify.c
parentda4fdf2d3ff45366d9378882ad1646306ceee305 (diff)
downloadgcc-88d8330d67ec17569e4b7e52989934bf6908a1f0.zip
gcc-88d8330d67ec17569e4b7e52989934bf6908a1f0.tar.gz
gcc-88d8330d67ec17569e4b7e52989934bf6908a1f0.tar.bz2
re PR rtl-optimization/54870 (gfortran.dg/array_constructor_4.f90 FAILs)
PR rtl-optimization/54870 * tree.h (TREE_ADDRESSABLE): Document special usage on SSA_NAME. * cfgexpand.c (update_alias_info_with_stack_vars ): Set it on the SSA_NAME pointer that points to a partition if there is at least one variable with it set in the partition. * dse.c (local_variable_can_escape): New predicate. (can_escape): Call it. * gimplify.c (mark_addressable): If this is a partitioned decl, also mark the SSA_NAME pointer that points to a partition. From-SVN: r192517
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index b83a634..14e7007 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -116,6 +116,19 @@ mark_addressable (tree x)
&& TREE_CODE (x) != RESULT_DECL)
return;
TREE_ADDRESSABLE (x) = 1;
+
+ /* Also mark the artificial SSA_NAME that points to the partition of X. */
+ if (TREE_CODE (x) == VAR_DECL
+ && !DECL_EXTERNAL (x)
+ && !TREE_STATIC (x)
+ && cfun->gimple_df != NULL
+ && cfun->gimple_df->decls_to_pointers != NULL)
+ {
+ void *namep
+ = pointer_map_contains (cfun->gimple_df->decls_to_pointers, x);
+ if (namep)
+ TREE_ADDRESSABLE (*(tree *)namep) = 1;
+ }
}
/* Return a hash value for a formal temporary table entry. */