(From upstream bug report) The cond_store_replacement() optimization can move a memory access outside of a conditional statement that checks whether it is safe to access the memory. This can cause the program to segfault. (Last comment in upstream bug report) A recently reported miscompilation of a device driver in the Linux/ARM kernel by gcc-4.6.3 was traced to this bug. Applying the trunk patch to 4.6.3 fixed that test case. Reproducible: Always This patch has been applied upstream to the 4.7 series. I'd like it if we could apply it to 4.6. It's been requested in the bug to be applied for a 4.6.4 release, and I'm running it locally here and it does indeed fix the issue.
added to all 4.6.x versions. pushed out in current 4.6.3 ebuild. http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.6.0/gentoo/39_all_cond-store-pr452445.patch?rev=1.1 http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.6.1/gentoo/39_all_cond-store-pr452445.patch?rev=1.1 http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.6.2/gentoo/39_all_cond-store-pr452445.patch?rev=1.1 http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.6.3/gentoo/39_all_cond-store-pr452445.patch?rev=1.1