This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]