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)