This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31862] Loop IM and other optimizations harmful for -fopenmp
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Feb 2009 08:26:07 -0000
- Subject: [Bug middle-end/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 #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