public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems
@ 2011-02-28 15:21 rsandifo at gcc dot gnu.org
  2011-02-28 15:37 ` [Bug rtl-optimization/47925] " rsandifo at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-02-28 15:21 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/47925] delete_trivially_dead_insns mishandles volatile mems
  2011-02-28 15:21 [Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems rsandifo at gcc dot gnu.org
@ 2011-02-28 15:37 ` rsandifo at gcc dot gnu.org
  2011-03-02 13:25 ` rsandifo at gcc dot gnu.org
  2011-03-04  9:14 ` rsandifo at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-02-28 15:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47925

rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.02.28 15:21:29
         AssignedTo|unassigned at gcc dot       |rsandifo at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/47925] delete_trivially_dead_insns mishandles volatile mems
  2011-02-28 15:21 [Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems rsandifo at gcc dot gnu.org
  2011-02-28 15:37 ` [Bug rtl-optimization/47925] " rsandifo at gcc dot gnu.org
@ 2011-03-02 13:25 ` rsandifo at gcc dot gnu.org
  2011-03-04  9:14 ` rsandifo at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-03-02 13:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47925

--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-03-02 13:25:13 UTC ---
Author: rsandifo
Date: Wed Mar  2 13:25:10 2011
New Revision: 170613

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170613
Log:
gcc/
    PR rtl-optimization/47925
    * cse.c (count_reg_usage): Don't ignore the SET_DEST of instructions
    with side effects.  Remove the more-specific check for volatile asms.

gcc/testsuite/
    PR rtl-optimization/47925
    * gcc.c-torture/execute/pr47925.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr47925.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cse.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/47925] delete_trivially_dead_insns mishandles volatile mems
  2011-02-28 15:21 [Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems rsandifo at gcc dot gnu.org
  2011-02-28 15:37 ` [Bug rtl-optimization/47925] " rsandifo at gcc dot gnu.org
  2011-03-02 13:25 ` rsandifo at gcc dot gnu.org
@ 2011-03-04  9:14 ` rsandifo at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-03-04  9:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47925

rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-03-04 09:14:06 UTC ---
Fix applied to trunk.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-04  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-28 15:21 [Bug rtl-optimization/47925] New: delete_trivially_dead_insns mishandles volatile mems rsandifo at gcc dot gnu.org
2011-02-28 15:37 ` [Bug rtl-optimization/47925] " rsandifo at gcc dot gnu.org
2011-03-02 13:25 ` rsandifo at gcc dot gnu.org
2011-03-04  9:14 ` rsandifo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).