Commit f3ac6d2c by Richard Biener Committed by Richard Biener

re PR debug/85176 (ICE in force_decl_die, at dwarf2out.c:25910)

2018-04-04  Richard Biener  <rguenther@suse.de>

	PR lto/85176
	* dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
	from contexts for DINFO_LEVEL_TERSE and below.

	* g++.dg/lto/pr85176_0.C: New testcase.

From-SVN: r259080
parent b4350271
2018-04-04 Richard Biener <rguenther@suse.de>
PR lto/85176
* dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
from contexts for DINFO_LEVEL_TERSE and below.
2018-04-04 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-doubleword.md (move_<mode>): Require
......
......@@ -5903,8 +5903,13 @@ dwarf2out_register_external_die (tree decl, const char *sym,
}
else
ctx = DECL_CONTEXT (decl);
/* Peel types in the context stack. */
while (ctx && TYPE_P (ctx))
ctx = TYPE_CONTEXT (ctx);
/* Likewise namespaces in case we do not want to emit DIEs for them. */
if (debug_info_level <= DINFO_LEVEL_TERSE)
while (ctx && TREE_CODE (ctx) == NAMESPACE_DECL)
ctx = DECL_CONTEXT (ctx);
if (ctx)
{
if (TREE_CODE (ctx) == BLOCK)
......
2018-04-04 Richard Biener <rguenther@suse.de>
PR lto/85176
* g++.dg/lto/pr85176_0.C: New testcase.
2018-04-04 Richard Biener <rguenther@suse.de>
PR testsuite/85191
* lib/target-supports.exp (check_effective_target_vect_perm_short):
Fix typo.
......
// { dg-lto-do link }
// { dg-lto-options { { -flto -g1 } } }
// { dg-extra-ld-options "-r -nostdlib" }
namespace a {
template <typename b, typename = b> class c;
template <typename b, typename d> void e(c<b, d> &);
void operator<<(c<char> &f, const char *) { e(f); }
extern c<char> cout;
}
int main() { a::cout << ""; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment