diff options
Diffstat (limited to 'gcc/cgraphunit.cc')
-rw-r--r-- | gcc/cgraphunit.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc index fa54a59..33ee89b 100644 --- a/gcc/cgraphunit.cc +++ b/gcc/cgraphunit.cc @@ -990,6 +990,10 @@ varpool_node::finalize_decl (tree decl) tree attr = lookup_attribute ("omp allocate", DECL_ATTRIBUTES (decl)); if (attr) { + /* The var loc, wrapped in a nop_expr, is stored here by + cp_parser_omp_allocate, finish_omp_allocate finalizes it, + we should never reach here before that happens. */ + gcc_assert (TREE_CODE (TREE_VALUE (attr)) != NOP_EXPR); tree align = TREE_VALUE (TREE_VALUE (attr)); if (align) SET_DECL_ALIGN (decl, MAX (tree_to_uhwi (align) * BITS_PER_UNIT, @@ -1198,7 +1202,12 @@ analyze_functions (bool first_time) build_type_inheritance_graph (); if (flag_openmp && first_time) - omp_discover_implicit_declare_target (); + { + omp_discover_implicit_declare_target (); + + if(flag_openmp_target == OMP_TARGET_MODE_OMPACC) + omp_ompacc_attribute_tagging (); + } /* Analysis adds static variables that in turn adds references to new functions. So we need to iterate the process until it stabilize. */ |