gcc/d/ChangeLog:
2019-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/89042
* decl.cc (DeclVisitor::visit(VarDeclaration)): Don't assert if
handling a void initialized manifest constant.
gcc/testsuite/ChangeLog:
2019-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/89042
* gdc.dg/pr89042a.d: New test.
* gdc.dg/pr89042b.d: New test.
From-SVN: r268304
+2019-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/89042
+ * decl.cc (DeclVisitor::visit(VarDeclaration)): Don't assert if
+ handling a void initialized manifest constant.
+
2019-01-21 Iain Buclaw <ibuclaw@gdcproject.org>
* d-frontend.cc (Compiler::paintAsType): Update for new signature.
if (d->isInstantiated ())
return;
+ /* Cannot make an expression out of a void initializer. */
+ if (!d->_init || d->_init->isVoidInitializer ())
+ return;
+
tree decl = get_symbol_decl (d);
- gcc_assert (d->_init && !d->_init->isVoidInitializer ());
Expression *ie = initializerToExpression (d->_init);
/* CONST_DECL was initially intended for enumerals and may be used for
+2019-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/89042
+ * gdc.dg/pr89042a.d: New test.
+ * gdc.dg/pr89042b.d: New test.
+
2019-01-26 Harald Anlauf <anlauf@gmx.de>
PR fortran/57553
--- /dev/null
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89042
+enum void[] a = void;
--- /dev/null
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89042
+enum void[2] a = void;