This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r269828 - in /trunk/gcc: d/ChangeLog d/d-codege...


Author: ibuclaw
Date: Wed Mar 20 23:52:48 2019
New Revision: 269828

URL: https://gcc.gnu.org/viewcvs?rev=269828&root=gcc&view=rev
Log:
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.

Added:
    trunk/gcc/testsuite/gdc.dg/pr89017.d
Modified:
    trunk/gcc/d/ChangeLog
    trunk/gcc/d/d-codegen.cc
    trunk/gcc/d/decl.cc
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]