This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36869] OpenMP issue in gcc vs icc
- From: "singler at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jul 2008 15:02:44 -0000
- Subject: [Bug c/36869] OpenMP issue in gcc vs icc
- References: <bug-36869-16481@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from singler at gcc dot gnu dot org 2008-07-24 15:02 -------
The test program is wrong. The loop counter i is not mentioned in the parallel
clause, so it is *shared*. Thus, the two loops interfere and the calculation of
pi goes wrong. Add private(i) to the clause or declare it locally and your
problem is fixed.
--
singler at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |singler at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36869