[Bug c/33653] volatile memory access optimized away

2007-10-04 Thread matz 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, %e

[Bug c/33653] volatile memory access optimized away

2007-10-04 Thread marcus at jet dot franken dot de
--- Comment #1 from marcus at jet dot franken dot de 2007-10-04 09:51 --- Created an attachment (id=14293) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14293&action=view) virtual.i gcc -c -O2 virtual.i -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33653