From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20184 invoked by alias); 26 Feb 2009 08:26:30 -0000 Received: (qmail 20109 invoked by uid 48); 26 Feb 2009 08:26:07 -0000 Date: Thu, 26 Feb 2009 08:26:00 -0000 Message-ID: <20090226082607.20108.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/31862] Loop IM and other optimizations harmful for -fopenmp In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ebotcazou at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg02230.txt.bz2 ------- 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