PR target/97106
gcc/
* config/nvptx/nvptx.cc (nvptx_asm_output_def_from_decls)
[ACCEL_COMPILER]: Make sure to emit C++ constructor, destructor
aliases.
libgomp/
* testsuite/libgomp.c++/pr96390.C: Un-XFAIL nvptx offloading.
* testsuite/libgomp.c-c++-common/pr96390.c: Adjust.
(cherry picked from commit
ca9cffe737d20953082333dacebb65d4261e0d0c)
2025-04-17 Thomas Schwinge <tschwinge@baylibre.com>
+ Backported from trunk:
+ 2025-04-16 Thomas Schwinge <tschwinge@baylibre.com>
+
+ PR target/97106
+ * config/nvptx/nvptx.cc (nvptx_asm_output_def_from_decls)
+ [ACCEL_COMPILER]: Make sure to emit C++ constructor, destructor
+ aliases.
+
Backported from trunk:
2025-04-14 Thomas Schwinge <tschwinge@baylibre.com>
#endif
cgraph_node *cnode = cgraph_node::get (name);
+#ifdef ACCEL_COMPILER
+ /* For nvptx offloading, make sure to emit C++ constructor, destructor aliases [PR97106]
+
+ For some reason (yet to be analyzed), they're not 'cnode->referred_to_p ()'.
+ (..., or that's not the right approach at all;
+ <https://inbox.sourceware.org/87v7rx8lbx.fsf@euler.schwinge.ddns.net>
+ "Re: [committed][nvptx] Use .alias directive for mptx >= 6.3"). */
+ if (DECL_CXX_CONSTRUCTOR_P (name)
+ || DECL_CXX_DESTRUCTOR_P (name))
+ ;
+ else
+#endif
if (!cnode->referred_to_p ())
/* Prevent "Internal error: reference to deleted section". */
return;
2025-04-17 Thomas Schwinge <tschwinge@baylibre.com>
+ Backported from trunk:
+ 2025-04-16 Thomas Schwinge <tschwinge@baylibre.com>
+
+ PR target/97106
+ * testsuite/libgomp.c++/pr96390.C: Un-XFAIL nvptx offloading.
+ * testsuite/libgomp.c-c++-common/pr96390.c: Adjust.
+
Backported from trunk:
2025-04-14 Thomas Schwinge <tschwinge@baylibre.com>
/* { dg-additional-options "-O0 -fdump-tree-omplower" } */
-/* { dg-additional-options "-foffload=-Wa,--verify" { target offload_target_nvptx } } */
-/* { dg-xfail-if "PR 97106/PR 97102 - .alias not (yet) supported for nvptx" { offload_target_nvptx } } */
#include <cstdlib>
#include <type_traits>
/* { dg-additional-options "-O0 -fdump-tree-omplower" } */
/* { dg-additional-options "-foffload=-Wa,--verify" { target offload_target_nvptx } } */
/* { dg-require-alias "" } */
-/* { dg-xfail-if "PR 97102/PR 97106 - .alias not (yet) supported for nvptx" { offload_target_nvptx } } */
+/* { dg-xfail-if PR105018 { offload_target_nvptx } } */
#ifdef __cplusplus
extern "C" {