From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22986 invoked by alias); 8 May 2007 14:44:31 -0000 Received: (qmail 22951 invoked by alias); 8 May 2007 14:44:16 -0000 Date: Tue, 08 May 2007 14:44:00 -0000 Message-ID: <20070508144416.22950.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/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: "dnovillo at acm 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: 2007-05/txt/msg00603.txt.bz2 ------- Comment #5 from dnovillo at acm dot org 2007-05-08 15:44 ------- Subject: Re: Loop IM and other optimizations harmful for -fopenmp On 8 May 2007 14:37:05 -0000, rguenth at gcc dot gnu dot org wrote: > OMP is not a good generic programming model for threaded code. Exactly because > of this issues. No. This is wrong. The model simply requires the compiler to be smarter. Sequential compilers are not aware of parallel semantics. If the compiler was thread-aware, these issues would be transparent to the user (as they should be). The original code did not have a race condition. The compiler transformations introduced a race-condition. This *is* a compiler bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31862