public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hailijuan at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/35246] New: declaration of threadprivate variable considered first use Date: Mon, 18 Feb 2008 04:29:00 -0000 [thread overview] Message-ID: <bug-35246-15289@http.gcc.gnu.org/bugzilla/> (raw) the simple omp-c++ testcase a.c caused g++ report error messages like following: # g++ -fopenmp a.c a.c:14: error: 'a' declared 'threadprivate' after first use # g++ -v Using built-in specs. Target: sparc-sun-solaris2.10 Configured with: /import/dr2/starlex/orig/trunk/configure --prefix=/import/dr3/s10/gcc-4.3/ --enable-languages=c,c++,fortran --disable-gnattools --with-mpfr=/ws/gccfss/tools --with-gmp=/ws/gccfss/tools Thread model: posix gcc version 4.3.0 20070912 (experimental) (GCC) ---------- src of a.c ---------- #include <stdio.h> #include <omp.h> class A { public: int i; A() { i = 10; }; }; A a; #pragma omp threadprivate(a) main() { omp_set_dynamic(false); omp_set_num_threads(5); #pragma omp parallel { printf("a.i = %d\n", a.i); } } ---------- end ---------- -- Summary: declaration of threadprivate variable considered first use Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hailijuan at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35246
next reply other threads:[~2008-02-18 4:29 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-18 4:29 hailijuan at gmail dot com [this message] 2008-02-18 4:38 ` [Bug c++/35246] " hailijuan at gmail dot com 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-35246-15289@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).