https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97318
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Tentative patch: ... diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index afac1bda45d..7b6a42893f9 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -365,6 +365,30 @@ nvptx_name_replacement (const char *name) return "__nvptx_free"; if (strcmp (name, "realloc") == 0) return "__nvptx_realloc"; + + if (strchr (name, '.') != NULL) + { + static char *p = NULL; + static size_t p_size = 0; + size_t len = strlen (name); + size_t len_0 = len + 1; + if (p == NULL) + { + p_size = len_0; + p = XNEWVEC (char, p_size); + } + else if (len_0 > p_size) + { + p_size = len_0; + p = XRESIZEVEC (char, p, p_size); + } + strncpy (p, name, len_0); + for (size_t i = 0; i < len_0; ++i) + if (p[i] == '.') + p[i] = '$'; + return p; + } + return name; } ...