[Bug d/89017] ICE in force_type_die, at dwarf2out.c:26061
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89017 --- Comment #4 from ibuclaw at gcc dot gnu.org --- Author: ibuclaw Date: Sun Apr 21 07:03:32 2019 New Revision: 270478 URL: https://gcc.gnu.org/viewcvs?rev=270478=gcc=rev Log: d: Use semanticRun to prevent declaration pass from running multiple times. This shouldn't happen during normal traversal of the AST provided from the front-end, however as there are some cases where declarations need to be visited out of order, such as what is being done in PR d/89017, it then becomes necessary to guard against this. gcc/d/ChangeLog: 2019-04-21 Iain Buclaw * decl.cc (DeclVisitor::visit(Import)): Set semanticRun after completion, guard against being called more than once. (DeclVisitor::visit(StructDeclaration)): Likewise. (DeclVisitor::visit(ClassDeclaration)): Likewise. (DeclVisitor::visit(InterfaceDeclaration)): Likewise. (DeclVisitor::visit(VarDeclaration)): Likewise. (DeclVisitor::visit(TypeInfoDeclaration)): Likewise. Modified: trunk/gcc/d/ChangeLog trunk/gcc/d/decl.cc
[Bug d/89017] ICE in force_type_die, at dwarf2out.c:26061
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89017 Iain Buclaw changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Iain Buclaw --- Fixed in r269828.
[Bug d/89017] ICE in force_type_die, at dwarf2out.c:26061
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89017 --- Comment #2 from ibuclaw at gcc dot gnu.org --- Author: ibuclaw Date: Wed Mar 20 23:52:48 2019 New Revision: 269828 URL: https://gcc.gnu.org/viewcvs?rev=269828=gcc=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 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 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
[Bug d/89017] ICE in force_type_die, at dwarf2out.c:26061
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89017 --- Comment #1 from G. Steinmetz --- $ gdc-9-20190120 -c z1.d -g -O2 during GIMPLE pass: fnsplit In function 'g': d21: internal compiler error: in dwarf2out_abstract_function, at dwarf2out.c:22550 0x872772 dwarf2out_abstract_function ../../gcc/dwarf2out.c:22550 0xbf1c89 tree_function_versioning(tree_node*, tree_node*, vec*, bool, bitmap_head*, bool, bitmap_head*, basic_block_def*) ../../gcc/tree-inline.c:5879 0x810276 cgraph_node::create_version_clone_with_body(vec, vec*, bitmap_head*, bool, bitmap_head*, basic_block_def*, char const*, tree_node*) ../../gcc/cgraphclones.c:1078 0x12e488f split_function ../../gcc/ipa-split.c:1327 0x12e7a01 execute_split_functions ../../gcc/ipa-split.c:1825