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&root=gcc&view=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 <ibuc...@gdcproject.org> * 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