https://gcc.gnu.org/g:0852f789d440bc17c15473015e31ad13103b2bdd
commit 0852f789d440bc17c15473015e31ad13103b2bdd Author: Thomas Schwinge <tschwi...@baylibre.com> Date: Mon Apr 7 12:39:33 2025 +0200 nvptx: In offloading compilation, special-case certain host-setup symbol aliases: avoid unused label 'emit_ptx_alias' diagnostic Minor fix-up for commit 65b31b3fff2fced015ded1026733605f34053796 "nvptx: In offloading compilation, special-case certain host-setup symbol aliases [PR101544]", as of which we see for non-offloading configurations: +[...]/source-gcc/gcc/config/nvptx/nvptx.cc: In function 'void nvptx_asm_output_def_from_decls(FILE*, tree, tree)': +[...]/source-gcc/gcc/config/nvptx/nvptx.cc:7769:2: warning: label 'emit_ptx_alias' defined but not used [-Wunused-label] + 7769 | emit_ptx_alias: + | ^~~~~~~~~~~~~~ gcc/ * config/nvptx/nvptx.cc (nvptx_asm_output_def_from_decls) [!ACCEL_COMPILER]: Don't define label 'emit_ptx_alias'. (cherry picked from commit 175016de6f9d800343ce31cf1837a3265569b657) Diff: --- gcc/ChangeLog.omp | 8 ++++++++ gcc/config/nvptx/nvptx.cc | 2 ++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 0ffb30b66c04..c5fd3e18383e 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,11 @@ +2025-04-17 Thomas Schwinge <tschwi...@baylibre.com> + + Backported from trunk: + 2025-04-08 Thomas Schwinge <tschwi...@baylibre.com> + + * config/nvptx/nvptx.cc (nvptx_asm_output_def_from_decls) + [!ACCEL_COMPILER]: Don't define label 'emit_ptx_alias'. + 2025-04-08 Tobias Burnus <tbur...@baylibre.com> Backported from master: diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index 8e5d9ecce70a..23987a479c47 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -8497,7 +8497,9 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name, return; } +#ifdef ACCEL_COMPILER emit_ptx_alias: +#endif cgraph_node *cnode = cgraph_node::get (name); if (!cnode->referred_to_p ())