d: Fix ICE force_type_die, at dwarf2out.c using nested types
In functions whose return type is instantiated from a nested template,
make sure that all members of the instance are emitted before finishing
the outer function, otherwise they will be removed during the
prune_unused_types pass.
gcc/d/ChangeLog:
2019-03-21 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/89017
* d-codegen.cc (d_decl_context): Skip over template instances when
finding the context.
* decl.cc (DeclVisitor::visit(TemplateDeclaration)): New override.
(build_type_decl): Include parameters in name of template types.
gcc/testsuite/ChangeLog:
2019-03-21 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/89017
* gdc.dg/pr89017.d: New test.
From-SVN: r269828