This is the mail archive of the gcc-prs@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]

Re: optimization/6673: gcc-3.1 produces wrong assembly code


The following reply was made to PR optimization/6673; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Nam SungHyun <namsh@wimo.co.kr>, rth@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   gcc-prs@gcc.gnu.org, namsh@kldp.org, nobody@gcc.gnu.org,
   gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: optimization/6673: gcc-3.1 produces wrong assembly code
Date: Thu, 16 May 2002 22:02:00 -0700

 On Fri, May 17, 2002 at 01:53:24PM +0900, Nam SungHyun wrote:
 > I saw the feed back message from the gnats web, but did not get a
 > mail. Did not know how I can reply for that feedback.
 
 The gnats bug form has an originator email address that
 it cc's all status changes on.  Did you mistype it?
 
 >     the 'a' in my example source is a 'global variable'.
 >     So, should the gcc treat it as a volatile by default?
 
 No.
 
 >     There are so many multi-threaded program. I didn't see
 >     any program which use volatile for the global variable.
 
 Nor does any C compiler produce "thread aware" code by default.
 
 You have to use cpu-specific thread synchronization primitives
 in order for that to work reliably.  Such a primitive would as
 a side effect tell the compiler that data must be committed to
 memory, which would cause 'a' to be written.
 
 You did none of these.
 
 
 r~


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