aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-06-14 17:27:24 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-06-14 17:27:24 +0200
commit1ace6185d22d5e23cf3fae342b9b48d18caad644 (patch)
treea038a08891c77147df8061be5e5979cdc97b4947 /gcc/tree.h
parent6b14c6d7ffc25b92aeea21f0c0c050582d3ed771 (diff)
downloadgcc-1ace6185d22d5e23cf3fae342b9b48d18caad644.zip
gcc-1ace6185d22d5e23cf3fae342b9b48d18caad644.tar.gz
gcc-1ace6185d22d5e23cf3fae342b9b48d18caad644.tar.bz2
re PR fortran/49103 (local variables exchange values / wrong code with -O3)
PR fortran/49103 * tree.h (DECL_NONSHAREABLE): Define. (struct tree_decl_common): Change decl_common_unused to decl_nonshareable_flag. * cfgexpand.c (expand_used_vars_for_block, clear_tree_used): Ignore vars with DECL_NONSHAREABLE bit set. * tree-cfg.c (gimple_duplicate_bb): Set DECL_NONSHAREABLE on stores to automatic aggregate vars. * gfortran.dg/pr49103.f90: New test. From-SVN: r175028
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 30c77d8..f55574d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1398,6 +1398,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
#define DECL_READ_P(NODE) \
(TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_read_flag)
+#define DECL_NONSHAREABLE(NODE) \
+ (TREE_CHECK2 (NODE, VAR_DECL, \
+ RESULT_DECL)->decl_common.decl_nonshareable_flag)
+
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
thunked-to function. */
#define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag)
@@ -2887,8 +2891,9 @@ struct GTY(()) tree_decl_common {
being set. */
unsigned decl_read_flag : 1;
- /* Padding so that 'off_align' can be on a 32-bit boundary. */
- unsigned decl_common_unused : 1;
+ /* In VAR_DECL or RESULT_DECL set when significant code movement precludes
+ attempting to share the stack slot with some other variable. */
+ unsigned decl_nonshareable_flag : 1;
/* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
unsigned int off_align : 8;