[Bug rtl-optimization/89528] Wrong debug info generated at -Og [gcc-trunk]

2019-04-16 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89528

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Alexandre Oliva  ---
Fixed

[Bug rtl-optimization/89528] Wrong debug info generated at -Og [gcc-trunk]

2019-04-16 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89528

--- Comment #5 from Alexandre Oliva  ---
Author: aoliva
Date: Tue Apr 16 12:44:57 2019
New Revision: 270389

URL: https://gcc.gnu.org/viewcvs?rev=270389&root=gcc&view=rev
Log:
[PR89528] reset debug uses of return value when dropping dead RTL call

When we remove an RTL call, we wouldn't clean up references to the
return value of the call in debug insns.  Make it so that we do.


for  gcc/ChangeLog

PR debug/89528
* valtrack.c (dead_debug_insert_temp): Reset debug references
to the return value of a call being removed.

for  gcc/testsuite/ChangeLog

PR debug/89528
* gcc.dg/guality/pr89528.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/guality/pr89528.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/valtrack.c

[Bug rtl-optimization/89528] Wrong debug info generated at -Og [gcc-trunk]

2019-04-04 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89528

--- Comment #4 from Alexandre Oliva  ---
Created attachment 46089
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46089&action=edit
candidate patch

Here's what I'm testing

[Bug rtl-optimization/89528] Wrong debug info generated at -Og [gcc-trunk]

2019-04-04 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89528

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org

--- Comment #3 from Alexandre Oliva  ---
DCE drops the dead call to j() after inserting debug temps that reference the
return value of the call, but it fails to adjust/reset the debug temp.  Looking
into how to fix it...

[Bug rtl-optimization/89528] Wrong debug info generated at -Og [gcc-trunk]

2019-03-31 Thread qrzhang at gatech dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89528

Qirun Zhang  changed:

   What|Removed |Added

 CC||qrzhang at gatech dot edu

--- Comment #2 from Qirun Zhang  ---
Bisection points to r217125.

[Bug rtl-optimization/89528] Wrong debug info generated at -Og [gcc-trunk]

2019-03-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89528

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-25
  Component|debug   |rtl-optimization
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed, this goes wrong on the RTL side somehow.

Breakpoint 2, n () at t.c:13
13  optimize_me_not();
(gdb) disassemble
Dump of assembler code for function n:
   0x004005ce <+0>: push   %rbx
=> 0x004005cf <+1>: mov$0x0,%eax
   0x004005d4 <+6>: callq  0x4005cd 

while we expand from

   [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = j (1);
  l_1127_8 = _1 ^ -65536;
  # DEBUG l_1127 => l_1127_8
  # DEBUG BEGIN_STMT
  optimize_me_not ();

not sure how RTL DCE got rid of the call..