From 09e3944e2b37fcbdbdd65a073c75d60382421165 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 1 Feb 2019 17:22:13 +0100 Subject: [PATCH] [PR hsa/87863] Set assembler name of group and global variables early 2019-02-01 Martin Jambor PR hsa/87863 * omp-grid.c (grid_mark_variable_segment): Set assembler name of group segment and global segment variables before making them static. From-SVN: r268452 --- gcc/ChangeLog | 6 ++++++ gcc/omp-grid.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 700dd701df5..5b34956eb06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-01 Martin Jambor + + PR hsa/87863 + * omp-grid.c (grid_mark_variable_segment): Set assembler name of group + segment and global segment variables before making them static. + 2019-02-01 Martin Jambor * omp-grid.c (grid_target_follows_gridifiable_pattern): Guard two diff --git a/gcc/omp-grid.c b/gcc/omp-grid.c index 79e9405ce3f..1fdd8fc2efb 100644 --- a/gcc/omp-grid.c +++ b/gcc/omp-grid.c @@ -934,6 +934,8 @@ grid_mark_variable_segment (tree var, enum grid_var_segment segment) if (!TREE_STATIC (var)) { TREE_STATIC (var) = 1; + const char *prefix = IDENTIFIER_POINTER (DECL_NAME (var)); + SET_DECL_ASSEMBLER_NAME (var, create_tmp_var_name (prefix)); varpool_node::finalize_decl (var); } -- 2.30.2