public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
@ 2011-02-24 13:42 zsojka at seznam dot cz
  2011-03-05 17:59 ` [Bug debug/47881] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2011-02-24 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] -fcompare-debug failure (length) with
                    -O -fno-dce -funroll-loops -fno-web
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
                CC: aoliva@gcc.gnu.org
              Host: i686-pc-linux-gnu
            Target: i686-pc-linux-gnu


Created attachment 23452
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23452
reduced testcase

Compiler output:
$ gcc -O -fcompare-debug -fno-dce -funroll-loops -fno-web testcase.c -m32
gcc: error: testcase.c: -fcompare-debug failure (length)

$ diff testcase.*gkd
943c943
< (insn# 0 0 39 (set (reg:SI 4 si)
---
> (insn# 0 0 39 (set (reg:SI 5 di)
947,948c947,948
<             (set (reg:SI 4 si)
<                 (plus:SI (reg:SI 4 si)
---
>             (set (reg:SI 5 di)
>                 (plus:SI (reg:SI 5 di)
...

Tested revisions:
r170450 - fail
4.5 r170013 - OK
4.5.2 - OK


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
@ 2011-03-05 17:59 ` rguenth at gcc dot gnu.org
  2011-03-06 13:55 ` steven at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-05 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
  2011-03-05 17:59 ` [Bug debug/47881] " rguenth at gcc dot gnu.org
@ 2011-03-06 13:55 ` steven at gcc dot gnu.org
  2011-03-07 10:12 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu.org @ 2011-03-06 13:55 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.06 13:55:09
                 CC|                            |steven at gcc dot gnu.org
     Ever Confirmed|0                           |1


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
  2011-03-05 17:59 ` [Bug debug/47881] " rguenth at gcc dot gnu.org
  2011-03-06 13:55 ` steven at gcc dot gnu.org
@ 2011-03-07 10:12 ` jakub at gcc dot gnu.org
  2011-03-07 10:39 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-07 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |vmakarov at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-07 10:12:04 UTC ---
While this started with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167390,
it looks just as it uncovered a latent IRA bug.
My guess is that the differences are related to ira-emit.c (change_loop)
creating
some new pseudos, whose live ranges then don't ignore debug insns (normally
debug insns would be changed or reset to avoid different lr ranges caused by
debug insns, but probably as this happens still within IRA it won't be
adjusted).


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-03-07 10:12 ` jakub at gcc dot gnu.org
@ 2011-03-07 10:39 ` rguenth at gcc dot gnu.org
  2011-03-07 11:33 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-07 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-03-07 10:39 ` rguenth at gcc dot gnu.org
@ 2011-03-07 11:33 ` jakub at gcc dot gnu.org
  2011-03-07 11:41 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-07 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-07 11:32:53 UTC ---
Problems start when the combiner leaves in a trivially dead insn by substing it
later on in some subsequent insn.  Nothing until IRA calls
delete_trivially_dead_insns, and when IRA calls it, it removes that insn, which
effectively shortens the lifetime of one of the pseudos.  Unfortunately that
psuedo is set multiple times (probably -funroll-loops is the reason), so
delete_trivially_dead_insns isn't trying to reset or change related debug
insns, it doesn't have enough infrastructure to do so.  Normally DF would then
reset them, but DF isn't recomputed until IRA finishes.


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-03-07 11:33 ` jakub at gcc dot gnu.org
@ 2011-03-07 11:41 ` jakub at gcc dot gnu.org
  2011-03-08 15:51 ` jakub at gcc dot gnu.org
  2011-03-08 15:55 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-07 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-07 11:41:17 UTC ---
--- gcc/ira.c.jj    2011-02-21 15:37:42.000000000 +0100
+++ gcc/ira.c    2011-03-07 12:33:59.000000000 +0100
@@ -3232,7 +3232,8 @@ ira (FILE *f)
     check_allocation ();
 #endif

-  delete_trivially_dead_insns (get_insns (), max_reg_num ());
+  if (delete_trivially_dead_insns (get_insns (), max_reg_num ()))
+    df_analyze ();

   init_reg_equiv_memory_loc ();

indeed fixes this testcase, haven't tried to bootstrap/regtest it nor have any
idea whether some IRA bookkeeping will need to be updated in that case.


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-03-07 11:41 ` jakub at gcc dot gnu.org
@ 2011-03-08 15:51 ` jakub at gcc dot gnu.org
  2011-03-08 15:55 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-08 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-08 15:51:18 UTC ---
Author: jakub
Date: Tue Mar  8 15:51:12 2011
New Revision: 170780

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170780
Log:
    PR debug/47881
    * ira.c (ira): Call df_analyze again if delete_trivially_dead_insns
    removed anything.

    * gcc.dg/pr47881.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr47881.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog
    trunk/gcc/ira.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug debug/47881] [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web
  2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2011-03-08 15:51 ` jakub at gcc dot gnu.org
@ 2011-03-08 15:55 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-08 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-08 15:54:57 UTC ---
Fixed.


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

end of thread, other threads:[~2011-03-08 15:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 13:42 [Bug debug/47881] New: [4.6 Regression] -fcompare-debug failure (length) with -O -fno-dce -funroll-loops -fno-web zsojka at seznam dot cz
2011-03-05 17:59 ` [Bug debug/47881] " rguenth at gcc dot gnu.org
2011-03-06 13:55 ` steven at gcc dot gnu.org
2011-03-07 10:12 ` jakub at gcc dot gnu.org
2011-03-07 10:39 ` rguenth at gcc dot gnu.org
2011-03-07 11:33 ` jakub at gcc dot gnu.org
2011-03-07 11:41 ` jakub at gcc dot gnu.org
2011-03-08 15:51 ` jakub at gcc dot gnu.org
2011-03-08 15:55 ` jakub 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).