public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/60815] New: Inconsistent prologue line table location
@ 2014-04-11  0:35 dblaikie at gmail dot com
  2014-04-11  0:44 ` [Bug debug/60815] " dblaikie at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dblaikie at gmail dot com @ 2014-04-11  0:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60815
           Summary: Inconsistent prologue line table location
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dblaikie at gmail dot com
                CC: ccoutant at gcc dot gnu.org, echristo at gmail dot com
              Host: x86_64
            Target: x86_64

Given:

template<typename T>
void func() // prologue
{
}

template void func<int>();

void f2()
{ // prologue
}

struct foo {
  void f3() // GCC prologue
  {
  }
  void f4();
};

void (foo::*x)() = &foo::f3;

void foo::f4()
{ // prologue
}

GCC's line table shows the prologue of both of these functions as the line of
the function name, not the opening '{'. Yet if these functions are
non-templates or out-of-line, the prologue starts at the opening brace, not the
function name.

(backstory: Clang consistently uses the opening brace but fails some GDB tests
that rely on GCC's behavior, even though it's inconsistent (see
gdb.cp/cpexprs.exp for some examples). It'd be great if both GCC and Clang
could agree on this, one way or another, but if not, the GDB tests can of
course be made resilient to the difference by simply putting the '{' on the
same line as the function name)


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

end of thread, other threads:[~2021-08-27 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11  0:35 [Bug debug/60815] New: Inconsistent prologue line table location dblaikie at gmail dot com
2014-04-11  0:44 ` [Bug debug/60815] " dblaikie at gmail dot com
2014-04-11  9:07 ` [Bug c++/60815] " rguenth at gcc dot gnu.org
2021-08-27 19:30 ` [Bug c++/60815] prologue line is wrong for templates pinskia 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).