re PR debug/90914 (ICE in schedule_generic_params_dies_gen, at dwarf2out.c:27153)
2019-06-21 Richard Biener <rguenther@suse.de> PR debug/90914 * dwarf2out.c (prune_unused_types_walk): Always consider function-local extern declarations as used. * g++.dg/debug/pr90914.C: New testcase. From-SVN: r272547
This commit is contained in:
parent
b614fca25f
commit
050e182a75
|
@ -1,3 +1,9 @@
|
||||||
|
2019-06-21 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR debug/90914
|
||||||
|
* dwarf2out.c (prune_unused_types_walk): Always consider
|
||||||
|
function-local extern declarations as used.
|
||||||
|
|
||||||
2019-06-21 Richard Biener <rguenther@suse.de>
|
2019-06-21 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/90913
|
PR tree-optimization/90913
|
||||||
|
|
|
@ -29419,10 +29419,17 @@ prune_unused_types_walk (dw_die_ref die)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* premark_used_variables marks external variables --- don't mark
|
/* premark_used_variables marks external variables --- don't mark
|
||||||
them here. */
|
them here. But function-local externals are always considered
|
||||||
|
used. */
|
||||||
if (get_AT (die, DW_AT_external))
|
if (get_AT (die, DW_AT_external))
|
||||||
|
{
|
||||||
|
for (c = die->die_parent; c; c = c->die_parent)
|
||||||
|
if (c->die_tag == DW_TAG_subprogram)
|
||||||
|
break;
|
||||||
|
if (!c)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2019-06-21 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR debug/90914
|
||||||
|
* g++.dg/debug/pr90914.C: New testcase.
|
||||||
|
|
||||||
2019-06-21 Richard Biener <rguenther@suse.de>
|
2019-06-21 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/90913
|
PR tree-optimization/90913
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-additional-options "-feliminate-unused-debug-symbols" }
|
||||||
|
|
||||||
|
template <class> class A;
|
||||||
|
void f ()
|
||||||
|
{
|
||||||
|
extern A <double> b;
|
||||||
|
}
|
Loading…
Reference in New Issue