public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/67192] New: Backward-goto in loop can get wrong line number
@ 2015-08-12 14:56 arnez at linux dot vnet.ibm.com
  2015-08-17 15:30 ` [Bug debug/67192] " arnez at linux dot vnet.ibm.com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: arnez at linux dot vnet.ibm.com @ 2015-08-12 14:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67192

            Bug ID: 67192
           Summary: Backward-goto in loop can get wrong line number
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arnez at linux dot vnet.ibm.com
  Target Milestone: ---

This bug causes a number of failures in the GDB test suite, e.g. with
checkpoint.exp.  I can reproduce it with the command line:

    gcc -fdump-tree-gimple-lineno -o foo.o -c -g foo.c

==== foo.c ====
extern int bar(void);
extern int baz(void);

extern int foo(int x);

int foo(int x)
{
  for (;;)
    {
      if (bar ())
        break;
      baz ();
    }
  baz (); /* Line 14. */
}

==== foo.c.004t.gimple ====
foo (int x)
[foo.c:7:1] {
  int D.1415;

  <D.1413>:
  [foo.c:10:11] D.1415 = bar ();
  [foo.c:10:10] if (D.1415 != 0) goto <D.1416>; else goto <D.1417>;
  <D.1416>:
  [foo.c:11:2] goto <D.1412>;
  <D.1417>:
  [foo.c:12:7] baz ();
  [foo.c:14:3] goto <D.1413>; /* <== WRONG! Should be [foo.c:13:5]. */
  <D.1412>:
  [foo.c:14:3] baz ();
}


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

end of thread, other threads:[~2015-10-23 15:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 14:56 [Bug debug/67192] New: Backward-goto in loop can get wrong line number arnez at linux dot vnet.ibm.com
2015-08-17 15:30 ` [Bug debug/67192] " arnez at linux dot vnet.ibm.com
2015-08-18 15:23 ` dmalcolm at gcc dot gnu.org
2015-08-18 15:52 ` dmalcolm at gcc dot gnu.org
2015-08-18 16:05 ` dmalcolm at gcc dot gnu.org
2015-08-18 16:11 ` dmalcolm at gcc dot gnu.org
2015-08-18 16:23 ` dmalcolm at gcc dot gnu.org
2015-08-18 17:16 ` arnez at linux dot vnet.ibm.com
2015-08-18 19:56 ` manu at gcc dot gnu.org
2015-08-18 20:07 ` ppalka at gcc dot gnu.org
2015-09-11 18:17 ` arnez at linux dot vnet.ibm.com
2015-09-23  1:31 ` ppalka at gcc dot gnu.org
2015-09-23  7:02 ` manu at gcc dot gnu.org
2015-10-08 16:40 ` [Bug debug/67192] [6 Regression] " manu at gcc dot gnu.org
2015-10-09 10:49 ` arnez at linux dot vnet.ibm.com
2015-10-09 10:58 ` manu at gcc dot gnu.org
2015-10-09 11:11 ` manu at gcc dot gnu.org
2015-10-12 14:32 ` arnez at linux dot vnet.ibm.com
2015-10-23 15:32 ` arnez at linux dot vnet.ibm.com

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