This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems
- From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Feb 2011 15:20:32 +0000
- Subject: [Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47925
Summary: delete_trivially_dead_insns mishandles volatile mems
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rsandifo@gcc.gnu.org
Created attachment 23494
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23494
Simple x86_64 testcase.
If we have a sequence like:
(set (reg A) ...)
(set (reg A) (mem/v (reg A)))
then a long-standing bug in delete_trivially_dead_insns will
cause it to delete the first instruction. The attached testcase
fails on x86_64 at -O and above.
The bug is in old code, so the failure in the testcase seems to go
back to at least 4.1. However, a combination of factors means that
it also shows up as a wrong-code regression in Qt using Linaro GCC 4.5.
I've not yet been able to find a specific testcase that regresses
in FSF GCC 4.5.