summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-16 15:40:30 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-16 15:40:30 +0000
commit769a3348a39302c10eec0c4cf662ee4b8b17e4e6 (patch)
tree8650fae09331232d78158b489c00c04309d2f1df /gcc/omp-low.c
parent47a09f55c1ce2aa5f1f38176354848cc03e87b94 (diff)
downloadgcc-769a3348a39302c10eec0c4cf662ee4b8b17e4e6.tar.gz
[PR 70857] Copy RESULT_DECL of HSA outlined kernel function
2016-05-16 Martin Jambor <mjambor@suse.cz> PR hsa/70857 * omp-low.c (grid_expand_target_grid_body): Copy RESULT_DECL of the outlined kernel function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236291 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index c9600fb6d33..a11f44b84a7 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -13681,6 +13681,9 @@ grid_expand_target_grid_body (struct omp_region *target)
tree new_parm_decl = copy_node (DECL_ARGUMENTS (kern_fndecl));
DECL_CONTEXT (new_parm_decl) = kern_fndecl;
DECL_ARGUMENTS (kern_fndecl) = new_parm_decl;
+ gcc_assert (VOID_TYPE_P (TREE_TYPE (DECL_RESULT (kern_fndecl))));
+ DECL_RESULT (kern_fndecl) = copy_node (DECL_RESULT (kern_fndecl));
+ DECL_CONTEXT (DECL_RESULT (kern_fndecl)) = kern_fndecl;
struct function *kern_cfun = DECL_STRUCT_FUNCTION (kern_fndecl);
kern_cfun->curr_properties = cfun->curr_properties;