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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2025-04-09
           Assignee|unassigned at gcc dot gnu.org      |tschwinge at gcc dot 
gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=94874,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=94876

--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I did conclude (but see below) that this should be handled via the
'omp_predetermined_mapping' langhook, added in
r11-873-g93535a2b40367e6f68433295b37dc52c0e9c2c55 "[OpenMP] Fix mapping of
artificial variables (PR94874)", such that for C++, this should return
'OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE' (or 'OMP_CLAUSE_DEFAULTMAP_TO'?) for
'DECL_TINFO_P' and 'DECL_VTABLE_OR_VTT_P' (correct, and complete list of
predicates?)?  (..., and also use this 'omp_predetermined_mapping' langhook for
OpenACC; PR94876.)

Well, but actually, re-reading old emails: in
<https://inbox.sourceware.org/20200512110238.GH8462@tucnak>, Jakub suggested:
via this langhook, we should "[...] firstprivate in some cases, though e.g. for
typeinfo and vtables I think we want to make them declare target to", and
similarly in <https://inbox.sourceware.org/20200526140604.GT8462@tucnak>:
"typeinfo symbols and vtables we should implicitly mark declare target to,
rather than trying to map them [via 'cxx_omp_predetermined_mapping']".

I'll look into that.

Reply via email to