http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47409
--- Comment #9 from John Regehr <regehr at cs dot utah.edu> 2013-01-30 04:36:01 UTC --- Just wanted to ping about this one; it's still there in tonight's GCC. regehr@home:~$ cat vol.c struct s2 { volatile int x; }; struct s2 s; void foo (void) { s = s; } regehr@home:~$ gcc -O0 vol.c -c regehr@home:~$ objdump -d vol.o vol.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <foo>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 5d pop %rbp 5: c3 retq regehr@home:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/regehr/z/compiler-install/gcc-r195565-install/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/regehr/z/compiler-source/gcc/configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r195565-install --enable-languages=c,c++ Thread model: posix gcc version 4.8.0 20130129 (experimental) (GCC)