diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/omp-low.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f71deca..d69d7b7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-02-24 Bernd Schmidt <bernds@codesourcery.com> + + * omp-low.c (create_omp_child_function): Tag entrypoint + functions with a special attribute. + 2015-02-24 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> PR target/65058 diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 182836b..75d6707 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2176,6 +2176,13 @@ create_omp_child_function (omp_context *ctx, bool task_copy) } } + if (cgraph_node::get_create (decl)->offloadable + && !lookup_attribute ("omp declare target", + DECL_ATTRIBUTES (current_function_decl))) + DECL_ATTRIBUTES (decl) + = tree_cons (get_identifier ("omp target entrypoint"), + NULL_TREE, DECL_ATTRIBUTES (decl)); + t = build_decl (DECL_SOURCE_LOCATION (decl), RESULT_DECL, NULL_TREE, void_type_node); DECL_ARTIFICIAL (t) = 1; |