From: Thomas Schwinge Date: Thu, 20 May 2021 13:45:06 +0000 (+0200) Subject: [OpenACC privatization] Skip processing if no work to be done [PR90115] X-Git-Tag: basepoints/gcc-13~7328 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad4612cb048b261f6834e9155e41e40e9252c80b;p=thirdparty%2Fgcc.git [OpenACC privatization] Skip processing if no work to be done [PR90115] gcc/ PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower): Skip processing if no work to be done. --- diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 336b48d5a3b7..8bfb8b36cf05 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -2246,7 +2246,8 @@ execute_oacc_device_lower () COMPONENT_REFS, ARRAY_REFS and plain VAR_DECLs are also rewritten to use the new decl, adjusting types of appropriate tree nodes as necessary. */ - if (targetm.goacc.adjust_private_decl) + if (targetm.goacc.adjust_private_decl + && !adjusted_vars.is_empty ()) { FOR_ALL_BB_FN (bb, cfun) for (gimple_stmt_iterator gsi = gsi_start_bb (bb);