http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60815
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-debug Component|debug |c++ --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Probably cfun->function_start_locus is inconsistent for them (or not set, in which case we use DECL_SOURCE_LOCATION). Sounds like a C++ frontend issue to me: static tree cp_parser_init_declarator (cp_parser* parser, cp_decl_specifier_seq *decl_specifiers, vec<deferred_access_check, va_gc> *checks, bool function_definition_allowed_p, bool member_p, int declares_class_or_enum, bool* function_definition_p, tree* maybe_range_for_decl) { ... if (decl != error_mark_node && DECL_STRUCT_FUNCTION (decl)) { /* This is where the prologue starts... */ DECL_STRUCT_FUNCTION (decl)->function_start_locus = func_brace_location; but for templates we likely don't have DECL_STRUCT_FUNCTION allocated at this point.