diff options
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 8b27a4570bd..6d1218d3f0a 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -8234,9 +8234,15 @@ expand_omp_target (struct omp_region *region) make_edge (else_bb, new_bb, EDGE_FALLTHRU); device = tmp_var; + gsi = gsi_last_bb (new_bb); + } + else + { + gsi = gsi_last_bb (new_bb); + device = force_gimple_operand_gsi (&gsi, device, true, NULL_TREE, + true, GSI_SAME_STMT); } - gsi = gsi_last_bb (new_bb); t = gimple_omp_target_data_arg (entry_stmt); if (t == NULL) { |