diff options
author | Jason Merrill <jason@redhat.com> | 2020-11-20 15:20:45 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-11-20 16:43:25 -0500 |
commit | 89d9c634dc5c10b499c23297ef70133066946790 (patch) | |
tree | a0e5fe1224bc29a3697b75b65134a0758323455c /gcc/gcov-io.h | |
parent | 27c5416fc8a4c2b33a0d6b6a26da2518791e0464 (diff) | |
download | gcc-89d9c634dc5c10b499c23297ef70133066946790.zip gcc-89d9c634dc5c10b499c23297ef70133066946790.tar.gz gcc-89d9c634dc5c10b499c23297ef70133066946790.tar.bz2 |
dwarf2: ICE with local class in unused function [PR97918]
Here, since we only mention bar<B>, we never emit debug information for it.
But we do emit debug information for H<J>::h, so we need to refer to the
debug info for bar<B>::J even though there is no bar<B>. We deal with this
sort of thing in dwarf2out with the limbo_die_list; parentless dies like J
get attached to the CU at EOF. But here, we were flushing the limbo list,
then generating the template argument DIE for H<J> that refers to J, which
adds J to the limbo list, too late to be flushed. So let's flush a little
later.
gcc/ChangeLog:
PR c++/97918
* dwarf2out.c (dwarf2out_early_finish): flush_limbo_die_list
after gen_scheduled_generic_parms_dies.
gcc/testsuite/ChangeLog:
PR c++/97918
* g++.dg/debug/localclass2.C: New test.
Diffstat (limited to 'gcc/gcov-io.h')
0 files changed, 0 insertions, 0 deletions