This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Don't hoist volatile mems out of loops
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: Don't hoist volatile mems out of loops
- From: Bernd Schmidt <bernds at balti dot cygnus dot co dot uk>
- Date: Fri, 10 Dec 1999 14:54:59 +0000 (GMT)
- cc: gcc-patches at gcc dot gnu dot org
On Wed, 8 Dec 1999, Joern Rennecke wrote:
> In article <Pine.LNX.4.10.9912081614350.4323-100000@balti.cygnus.co.uk> you wrote:
> : I noticed this bug when I tried to prevent overoptimization of a loop
> : by adding "volatile" to a global variable and found that the compiler
> : ignored it. That was with gcc-2.95.2.
>
> There have been a number of changes since gcc-2.95.2. Have you checked that
> this has not been fixed with this patch?
>
> Thu Nov 11 19:45:24 1999 Jim Wilson <wilson@cygnus.com>
>
> * loop.c (invariant_p, case MEM): Put MEM_VOLATILE_P check back.
Seems like you're right. I can't reproduce this with current CVS, and since
I was stupid enough not to make a copy of the original example that triggered
the problem, I can't reproduce it with gcc 2.95.2 either :-{ I'll back out
the patch and try to investigate some more.
Bernd