This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31862] Loop IM and other optimizations harmful for -fopenmp
- From: "pinskia at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2007 14:59:32 -0000
- Subject: [Bug tree-optimization/31862] Loop IM and other optimizations harmful for -fopenmp
- References: <bug-31862-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gmail dot com 2007-05-08 15:59 -------
Subject: Re: Loop IM and other optimizations harmful for -fopenmp
On 8 May 2007 14:44:16 -0000, dnovillo at acm dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> The original code did not have a race condition. The compiler
> transformations introduced a race-condition. This *is* a compiler
> bug.
Actually the original code has a race condition, if another thread is
reading from var and then acting on that and writting back. This is
why threading programming is considered hard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31862