https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97060
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:87b7d45e358e4df93b6a93b2e7a55b123ea76f5d commit r11-4933-g87b7d45e358e4df93b6a93b2e7a55b123ea76f5d Author: Jason Merrill <ja...@redhat.com> Date: Tue Nov 10 18:02:04 2020 -0500 dwarf2: Set DW_AT_declaration for undefined fns [PR97060] If DECL_INITIAL isn't set, we can't emit anything about the body of the function, so add the declaration attribute. gcc/ChangeLog: PR debug/97060 * dwarf2out.c (gen_subprogram_die): It's a declaration if DECL_INITIAL isn't set. gcc/testsuite/ChangeLog: PR debug/97060 * gcc.dg/debug/dwarf2/pr97060.c: New test.