This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/31862] Loop IM and other optimizations harmful for -fopenmp



------- Comment #25 from ebotcazou at gcc dot gnu dot org  2009-02-26 08:26 -------
> Also, you can have the same problem with this kind of code without threads.
> Imagine, for example, if the 'shared_variable' may be in read-only memory and
> 'can_write' indicates this case.

Then it must be declared 'volatile'.  This optimization is valid in ISO C if
the
variable is not declared so.  Of course that's orthogonal to this PR.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31862


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]