This is the mail archive of the gcc-patches@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: [PATCH] Fix PR47559


On Tue, 1 Feb 2011, Zdenek Dvorak wrote:

> Hi,
> 
> > Committed as rev. 169487.  That leaves us with the correctness issues
> > that we eliminate stores to global memory from endless loops.  w/o
> > non-call exceptions we optimize the testcase to while (1);
> 
> what correctness issues?  If the loop is endless, eliminating the stores
> preserves the semantics,

I'm not sure.  Consider this loop done in a thread, a lame way
of initializing a global and another thread using the data.
One might argue there are volatiles missing, but it at least looks
suspicious to me (we'd better move that store before the loop
instead of trying to move it after it).

I've opened PR47575 to track this possible issue.

Richard.


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