ref: 858ba07669c28ac1e8e88ef0283fb71615cd86c4
parent: 3360bf0e88b086b0c7f7957eeb4a6f0b4eaeebc7
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 4 20:10:24 EST 2017
All extern consts should be global.
--- a/6/simp.c
+++ b/6/simp.c
@@ -181,7 +181,9 @@
static void
declarelocal(Simp *s, Node *n)
{
- if (isconstfn(n))
+ if (n->type == Nexpr)
+ n = decls[n->decl.did];
+ if (n->decl.isconst && n->decl.isextern)
htput(s->globls, n, asmname(n));
else if (stacknode(n))
forcelocal(s, n);