This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33653] volatile memory access optimized away
- From: "matz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2007 09:53:35 -0000
- Subject: [Bug c/33653] volatile memory access optimized away
- References: <bug-33653-3760@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from matz at gcc dot gnu dot org 2007-10-04 09:53 -------
Smaller testcase:
void f (volatile char *p)
{
char c = p[0];
}
This access to the volatile object p[0] must not be optimized away, but:
% ./gcc/cc1 -O1 x.c
% cat x.s
f:
pushl %ebp
movl %esp, %ebp
popl %ebp
ret
--
matz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-10-04 09:53:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33653