public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/27557] OpenMP threadprivate directive does not work with non-POD types Date: Fri, 16 Apr 2021 10:42:27 +0000 [thread overview] Message-ID: <bug-27557-4-PaXlLDdSyg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-27557-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27557 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- It actually is hard, otherwise it would be done sooner. There is easy workaround, one can declare the var before actually defining, extern whatever var; #pragma omp threadprivate(var) whatever var; or once OpenMP 5.1 C++ attributes are implemented through whatever var [[omp::directive(threadprivate(var))]]; because in that case threadprivate is visible right on the var definition. The problem is that right now the construction of vars acts as a variable use and it is impossible to distinguish between such definition and some other uses of the variable in between its definition and the threadprivate directive.
next prev parent reply other threads:[~2021-04-16 10:42 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-27557-4@http.gcc.gnu.org/bugzilla/> 2011-04-06 19:54 ` brooks at gcc dot gnu.org 2012-10-15 20:36 ` jason at gcc dot gnu.org 2012-11-12 18:29 ` carlos at systemhalted dot org 2013-03-22 14:43 ` jakub at gcc dot gnu.org 2013-05-31 10:57 ` jakub at gcc dot gnu.org 2013-06-13 9:35 ` siddhesh at redhat dot com 2013-10-16 9:50 ` jakub at gcc dot gnu.org 2014-01-24 16:57 ` krafczyk.matthew at gmail dot com 2014-02-06 9:03 ` siddhesh at redhat dot com 2014-02-17 0:21 ` krafczyk.matthew at gmail dot com 2015-03-22 8:49 ` krafczyk.matthew at gmail dot com 2015-06-22 14:25 ` rguenth at gcc dot gnu.org 2021-04-16 8:36 ` jcownie at gmail dot com 2021-04-16 10:42 ` jakub at gcc dot gnu.org [this message] 2021-04-16 11:52 ` jcownie at gmail dot com 2006-05-11 14:45 [Bug c++/27557] New: " Georg dot Baum at post dot rwth-aachen dot de 2006-05-16 10:20 ` [Bug c++/27557] " jakub at gcc dot gnu dot org 2006-05-16 15:04 ` Georg dot Baum at post dot rwth-aachen dot de 2006-05-18 16:51 ` pinskia at gcc dot gnu dot org 2007-11-30 21:56 ` pinskia at gcc dot gnu dot org 2008-02-18 5:09 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27557-4-PaXlLDdSyg@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).