public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54200] New: copyrename generates wrong debuginfo
@ 2012-08-08 11:14 rguenth at gcc dot gnu.org
  2012-08-08 11:37 ` [Bug tree-optimization/54200] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-08 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54200
           Summary: copyrename generates wrong debuginfo
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: wrong-debug
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


For gcc.target/i386/pad-10.c copyrename transforms

foo2 (int z, int x)
{
  int D.1754;

<bb 2>:
  if (x_2(D) == 1)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 3>:
  bar ();
  D.1754_4 = z_3(D);
  goto <bb 5>;

<bb 4>:
  D.1754_5 = x_2(D) + z_3(D);

<bb 5>:
  # D.1754_1 = PHI <D.1754_4(3), D.1754_5(4)>
  return D.1754_1;
}

to

foo2 (int z, int x)
{
<bb 2>:
  if (x_2(D) == 1)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 3>:
  bar ();
  z_4 = z_3(D);
  goto <bb 5>;

<bb 4>:
  z_5 = x_2(D) + z_3(D);

<bb 5>:
  # z_1 = PHI <z_4(3), z_5(4)>
  return z_1;
}

note the bogus stmts

   z_5 = x_2(D) + z_3(D);

<bb 5>:
   # z_1 = PHI <z_4(3), z_5(4)>
   return z_1;

which assign to z values different from the incoming parameter value.

[the question is if copyrename is still useful now that we have VTA
and will insert debug stmts for assignments to names we'd loose over
a copyprop/dce combo]


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

end of thread, other threads:[~2013-04-02  7:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 11:14 [Bug tree-optimization/54200] New: copyrename generates wrong debuginfo rguenth at gcc dot gnu.org
2012-08-08 11:37 ` [Bug tree-optimization/54200] " rguenth at gcc dot gnu.org
2012-08-08 12:16 ` rguenth at gcc dot gnu.org
2012-08-08 12:22 ` rguenth at gcc dot gnu.org
2012-08-08 15:31 ` pinskia at gcc dot gnu.org
2012-08-09  8:06 ` rguenther at suse dot de
2012-08-10 14:19 ` rguenth at gcc dot gnu.org
2012-08-13  9:29 ` rguenth at gcc dot gnu.org
2012-08-13 11:55 ` rguenth at gcc dot gnu.org
2012-08-13 12:14 ` izamyatin at gmail dot com
2012-08-13 12:35 ` rguenth at gcc dot gnu.org
2012-08-13 12:47 ` izamyatin at gmail dot com
2013-03-29 15:36 ` jakub at gcc dot gnu.org
2013-04-02  7:56 ` rguenther at suse dot de

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).