From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24629 invoked by alias); 29 Apr 2008 18:52:34 -0000 Received: (qmail 23548 invoked by uid 48); 29 Apr 2008 18:51:39 -0000 Date: Tue, 29 Apr 2008 18:52:00 -0000 Subject: [Bug driver/36081] New: gcc optimizations and threads (pthread) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "snes2002 at freenet dot de" 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: 2008-04/txt/msg02087.txt.bz2 gcc version 4.2.1 (Debian 4.2.1-3) System: debian-installation from knoppix 5.1.1 When optimizations are turned on (-O, -O1, -O2, -O3), two or more threads don't recognize when the value of a global variable changes. It doesn't matter if it's a global variable or a pointer to a local variable. The change of its value by thread no 1 will not be recognized by thread no 2. -- Summary: gcc optimizations and threads (pthread) Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: snes2002 at freenet dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081