public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/42685]  New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
@ 2010-01-10 23:31 zsojka at seznam dot cz
  2010-01-10 23:33 ` [Bug tree-optimization/42685] " zsojka at seznam dot cz
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-10 23:31 UTC (permalink / raw)
  To: gcc-bugs

Command line:
g++ -O1 -fcompare-debug -funroll-loops -c testcase.cpp
-fno-web helps even in the nonreduced testcase

Tested revisions:
r155777 - crash
r155680 - crash
r154830 - crash
r153685 - crash

Output:
$ /mnt/svn/gcc-trunk/binary-155777-lto/bin/g++ -O1 -fcompare-debug
-funroll-loops -c testcase.cpp
g++: testcase.cpp: -fcompare-debug failure

Valgrind:
no errors reported


-- 
           Summary: "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug tree-optimization/42685] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
@ 2010-01-10 23:33 ` zsojka at seznam dot cz
  2010-01-10 23:41 ` zsojka at seznam dot cz
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-10 23:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2010-01-10 23:33 -------
Created an attachment (id=19534)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19534&action=view)
reduced testcase

Command line:
g++ -O1 -fcompare-debug -funroll-loops -c pr42685.cpp


-- 


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


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

* [Bug tree-optimization/42685] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
  2010-01-10 23:33 ` [Bug tree-optimization/42685] " zsojka at seznam dot cz
@ 2010-01-10 23:41 ` zsojka at seznam dot cz
  2010-01-12  9:11 ` [Bug tree-optimization/42685] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-10 23:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from zsojka at seznam dot cz  2010-01-10 23:41 -------
Could be related to pr42642


-- 

zsojka at seznam dot cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu dot
                   |                            |org


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
  2010-01-10 23:33 ` [Bug tree-optimization/42685] " zsojka at seznam dot cz
  2010-01-10 23:41 ` zsojka at seznam dot cz
@ 2010-01-12  9:11 ` rguenth at gcc dot gnu dot org
  2010-01-12 18:09 ` zsojka at seznam dot cz
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-12  9:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|"-fcompare-debug failure"   |[4.5 Regression] "-fcompare-
                   |with "-O1 -funroll-loops"   |debug failure" with "-O1 -
                   |(2)                         |funroll-loops" (2)
   Target Milestone|---                         |4.5.0


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-01-12  9:11 ` [Bug tree-optimization/42685] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-01-12 18:09 ` zsojka at seznam dot cz
  2010-01-14 16:39 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-12 18:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from zsojka at seznam dot cz  2010-01-12 18:08 -------
Created an attachment (id=19566)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19566&action=view)
different reduced testcase

I don't know if it's the same problem, but fails with the same flags.

$ gcc -O1 -fcompare-debug -funroll-loops -c pr42685-2.c
gcc: pr42685-2.c: -fcompare-debug failure


-- 


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-01-12 18:09 ` zsojka at seznam dot cz
@ 2010-01-14 16:39 ` rguenth at gcc dot gnu dot org
  2010-01-18 17:00 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-14 16:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-01-14 16:39 ` rguenth at gcc dot gnu dot org
@ 2010-01-18 17:00 ` steven at gcc dot gnu dot org
  2010-01-18 19:17 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-18 17:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from steven at gcc dot gnu dot org  2010-01-18 17:00 -------
This still fails, even with Alexandre's patch for bug 42631.

With -fno-web the failure disappears. So this is probably another issue in the
webizer.

Investigating -> mine for now.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-18 17:00:13
               date|                            |


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-01-18 17:00 ` steven at gcc dot gnu dot org
@ 2010-01-18 19:17 ` steven at gcc dot gnu dot org
  2010-01-18 19:19 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-18 19:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from steven at gcc dot gnu dot org  2010-01-18 19:16 -------
Register number differences appear - again - because a USE operand of a
DEBUG_INSN ends up in a web of its own:

--- R1web/pr42685-2.c.167r.web  2010-01-18 11:11:38.000000000 -0800
+++ R2web/pr42685-2.c.167r.web  2010-01-18 11:11:38.000000000 -0800
@@ -7,275 +7,323 @@
 df_worklist_dataflow_doublequeue:n_basic_blocks 55 n_edges 83 count 108 (   
2)
 df_worklist_dataflow_doublequeue:n_basic_blocks 55 n_edges 83 count 109 (   
2)
 Web oldreg=386 newreg=401
-Updating insn 82 (386->401)
-deferring rescan insn with uid = 82.
-Web oldreg=371 newreg=402
-Updating insn 63 (371->402)
-deferring rescan insn with uid = 63.
-Web oldreg=375 newreg=403
-Updating insn 394 (375->403)
-deferring rescan insn with uid = 394.
+Updating insn 96 (386->401)
+deferring rescan insn with uid = 96.
+Web oldreg=375 newreg=402
+Updating insn 72 (375->402)
+deferring rescan insn with uid = 72.
+Web oldreg=371 newreg=403
+Updating insn 75 (371->403)
+deferring rescan insn with uid = 75.
+Updating insn 468 (375->402)
+deferring rescan insn with uid = 468.

...

@@ -413,12 +474,19 @@
             (label_ref #)
             (pc)))# {*br_true} (expr_list:REG_BR_PROB (const_int 7100
[0x1bbc])
         (nil))
- -> 65)
+ -> 77)

 (note# # # 10 [bb 10] NOTE_INSN_BASIC_BLOCK)

+(debug_insn# # # 10 pr42685-2.c:19 (var_location:DI D#2 (zero_extend:DI
(reg/v:SI 402 [ i ])))# (nil))
+
+(debug_insn# # # 10 pr42685-2.c:19 (var_location:DI D#1 (mult:DI
(debug_expr:DI D#2)
+        (const_int 4 [0x4])))# (nil))
+
+(debug_insn# # # 10 pr42685-2.c:19 (var_location:DI s (clobber (const_int 0
[0x0])))# (nil))
+
 (insn# # # 10 pr42685-2.c:10 (set (reg:SI 120 out0)
-        (mem/s/j:SI (reg:DI 402 [ ivtmp.5 ]) [0 D.1998->i+0 S4 A32]))#
{movsi_internal} (nil))
+        (mem/s/j:SI (reg:DI 403 [ ivtmp.5 ]) [0 D.1998->i+0 S4 A32]))#
{movsi_internal} (nil))

 (call_insn# # # 10 pr42685-2.c:10 (parallel [
             (call (mem:DI (symbol_ref:DI ("baz") [flags 0x41]  <function_decl
# baz>) [0 S8 A64])


This whole compare-debug stuff makes no sense to me, so I'm not even going to
try to come up with a fix. IMHO the proper fix would be to never even try to
rename a web that consists of just a single USE. I don't see how that is any
more "right" than no debug info at all since no DEF reaches the USE (i.e.
uninitialized) so any value represented in the debug info is fair and
reasonable.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|steven at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2010-01-18 19:17 ` steven at gcc dot gnu dot org
@ 2010-01-18 19:19 ` steven at gcc dot gnu dot org
  2010-01-26 15:15 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-18 19:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from steven at gcc dot gnu dot org  2010-01-18 19:19 -------
*** Bug 42642 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2010-01-18 19:19 ` steven at gcc dot gnu dot org
@ 2010-01-26 15:15 ` rguenth at gcc dot gnu dot org
  2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
  2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-26 15:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-01-26 15:15 -------
I have an extremely lame patch that fixes both testcases. 
s/INSN_P/NONDEBUG_INSN_P/


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-01-18 17:00:13         |2010-01-26 15:15:08
               date|                            |


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
@ 2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-26 16:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2010-01-26 16:27 -------
Subject: Bug 42685

Author: rguenth
Date: Tue Jan 26 16:27:34 2010
New Revision: 156252

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156252
Log:
2010-01-26  Richard Guenther  <rguenther@suse.de>

        PR rtl-optimization/42685
        * web.c (web_main): Ignore DEBUG_INSNs.

        * gcc.dg/pr42685.c: New testcase.
        * g++.dg/other/pr42685.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/other/pr42685.C
    trunk/gcc/testsuite/gcc.dg/pr42685.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/web.c


-- 


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


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

* [Bug tree-optimization/42685] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops" (2)
  2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2010-01-26 15:15 ` rguenth at gcc dot gnu dot org
@ 2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
  2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-26 16:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2010-01-26 16:27 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-01-26 16:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-10 23:31 [Bug tree-optimization/42685] New: "-fcompare-debug failure" with "-O1 -funroll-loops" (2) zsojka at seznam dot cz
2010-01-10 23:33 ` [Bug tree-optimization/42685] " zsojka at seznam dot cz
2010-01-10 23:41 ` zsojka at seznam dot cz
2010-01-12  9:11 ` [Bug tree-optimization/42685] [4.5 Regression] " rguenth at gcc dot gnu dot org
2010-01-12 18:09 ` zsojka at seznam dot cz
2010-01-14 16:39 ` rguenth at gcc dot gnu dot org
2010-01-18 17:00 ` steven at gcc dot gnu dot org
2010-01-18 19:17 ` steven at gcc dot gnu dot org
2010-01-18 19:19 ` steven at gcc dot gnu dot org
2010-01-26 15:15 ` rguenth at gcc dot gnu dot org
2010-01-26 16:28 ` rguenth at gcc dot gnu dot org
2010-01-26 16:28 ` rguenth at gcc dot gnu dot 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).