diff options
author | Marek Polacek <polacek@redhat.com> | 2015-06-25 16:26:05 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-06-25 16:26:05 +0000 |
commit | 62f9079a9372e04d7610098c57e7c320d922459b (patch) | |
tree | ee57812f3920d45a650fbc3892f19fba214ab28f /gcc/c/c-decl.c | |
parent | 88f554b4b93e260d8733c372f93e77c91c564e77 (diff) | |
download | gcc-62f9079a9372e04d7610098c57e7c320d922459b.zip gcc-62f9079a9372e04d7610098c57e7c320d922459b.tar.gz gcc-62f9079a9372e04d7610098c57e7c320d922459b.tar.bz2 |
cilk.c (extract_free_variables): Use is_global_var.
* cilk.c (extract_free_variables): Use is_global_var.
* c-decl.c: Use is_global_var throughout.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
From-SVN: r224947
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index fc1fdf9..1aa2bd4 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -4395,7 +4395,7 @@ c_decl_attributes (tree *node, tree attributes, int flags) /* Add implicit "omp declare target" attribute if requested. */ if (current_omp_declare_target_attribute && ((TREE_CODE (*node) == VAR_DECL - && (TREE_STATIC (*node) || DECL_EXTERNAL (*node))) + && is_global_var (*node)) || TREE_CODE (*node) == FUNCTION_DECL)) { if (TREE_CODE (*node) == VAR_DECL @@ -4794,8 +4794,7 @@ finish_decl (tree decl, location_t init_loc, tree init, TREE_TYPE (decl) = error_mark_node; } - if ((DECL_EXTERNAL (decl) || TREE_STATIC (decl)) - && DECL_SIZE (decl) != 0) + if (is_global_var (decl) && DECL_SIZE (decl) != 0) { if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST) constant_expression_warning (DECL_SIZE (decl)); @@ -4911,8 +4910,7 @@ finish_decl (tree decl, location_t init_loc, tree init, { /* Recompute the RTL of a local array now if it used to be an incomplete type. */ - if (was_incomplete - && !TREE_STATIC (decl) && !DECL_EXTERNAL (decl)) + if (was_incomplete && !is_global_var (decl)) { /* If we used it already as memory, it must stay in memory. */ TREE_ADDRESSABLE (decl) = TREE_USED (decl); |