https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118876

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is that when we go in register_dtor_fn the !use_dtor route (because
the type of the object is not a class type but an array and so we need to
synthetize something that can be called), a new function is created,
__tcf<name_of_variable>.
And it doesn't really work properly to build the same function multiple time
(once for host, once for nohost).
So, either we'd need to arrange to build a unique function each time (and still
mark it "omp declare target" and "omp declare target nohost"), or use the same
function both times (and mark it "omp declare target" in that case).

BTW,
extern "C" void __tcfs (void*) {}
struct S { ~S () {} };
S s[2];
ICEs the same way even without OpenMP, and using extern "C" void __tcfs (void)
{}
ICEs in a different way.  __ prefix is in implementation namespace, so perhaps
we should just error on it?

Reply via email to