This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34517] New: INCOROUT: C++ OpenMP lastprivate
- From: "hailijuan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Dec 2007 06:06:26 -0000
- Subject: [Bug c++/34517] New: INCOROUT: C++ OpenMP lastprivate
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
testcase b.C attached to show the problem. "a.ai += addnum" refers to distinct
objects therefore a.ai finally equals to 7 rather than 28 (now it is!) when
reaching printf.
micro# g++ b.C -fopenmp
micro# ./a.out
constructor
constructor
constructor
constructor
constructor
ai: 28 exp: 7 af: 28.000000 exp: 7
micro# 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)
--
Summary: INCOROUT: C++ OpenMP lastprivate
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
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=34517