public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56094] New: Invalid line number info generated with tree-level ivopts
@ 2013-01-24  4:03 josh.m.conner at gmail dot com
  2013-01-24  4:04 ` [Bug tree-optimization/56094] " josh.m.conner at gmail dot com
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: josh.m.conner at gmail dot com @ 2013-01-24  4:03 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56094
           Summary: Invalid line number info generated with tree-level
                    ivopts
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: josh.m.conner@gmail.com


The attached code has a number of instructions that are associated with the
head of the function.  This was showing up when setting a breakpoint on the
function itself and gdb was setting several - not a problem in general, except
that the statements were more appropriately correlated with intra-loop
calculations instead of anything to do with the prologue.

To reproduce, compile the attached file with -g -O2, and notice the statements
associated with line 83.

These lines are in fact statements that are generated during tree-level
induction variable optimization, but which aren't getting their location data
copied over from the gimple statement and so they default to the start of the
function (sorry for being a bit vague, but it's been a while since I looked
into the mechanics of this and I don't recall the details).

The fix I have implemented in our local tree is in rewrite_use_nonlinear_expr,
where after generating the computation (comp) I verify that it has a location
associated with it - if it doesn't but the use stmt (use->stmt) does have a
location, I copy the location from the use->stmt over to comp.


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

end of thread, other threads:[~2013-01-28 14:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-24  4:03 [Bug tree-optimization/56094] New: Invalid line number info generated with tree-level ivopts josh.m.conner at gmail dot com
2013-01-24  4:04 ` [Bug tree-optimization/56094] " josh.m.conner at gmail dot com
2013-01-24  4:05 ` josh.m.conner at gmail dot com
2013-01-24 12:17 ` rguenth at gcc dot gnu.org
2013-01-24 14:19 ` jakub at gcc dot gnu.org
2013-01-24 15:06 ` jakub at gcc dot gnu.org
2013-01-24 17:27 ` jakub at gcc dot gnu.org
2013-01-24 18:30 ` manu at gcc dot gnu.org
2013-01-24 18:38 ` rguenther at suse dot de
2013-01-24 18:40 ` manu at gcc dot gnu.org
2013-01-24 19:31 ` rguenther at suse dot de
2013-01-24 20:50 ` manu at gcc dot gnu.org
2013-01-25 11:29 ` jakub at gcc dot gnu.org
2013-01-25 11:43 ` manu at gcc dot gnu.org
2013-01-25 12:05 ` jakub at gcc dot gnu.org
2013-01-28  8:56 ` rguenth at gcc dot gnu.org
2013-01-28 14:06 ` jakub at gcc dot gnu.org
2013-01-28 14:33 ` 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).