[Bug c/36869] OpenMP issue in gcc vs icc

singler at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 24 15:03:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list