diff options
author | Ori Bernstein <ori@eigenstate.org> | 2017-12-05 01:10:24 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2017-12-05 01:10:24 -0800 |
commit | 858ba07669c28ac1e8e88ef0283fb71615cd86c4 (patch) | |
tree | 49df027ca7c50caebaeaef7cfa1f068534b5ddc4 | |
parent | 3360bf0e88b086b0c7f7957eeb4a6f0b4eaeebc7 (diff) | |
download | mc-858ba07669c28ac1e8e88ef0283fb71615cd86c4.tar.gz |
All extern consts should be global.
-rw-r--r-- | 6/simp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -181,7 +181,9 @@ forcelocal(Simp *s, Node *n) 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); |