Commit bba10b3f authored by Ken Thompson's avatar Ken Thompson

some array init bugs

renamed 6g/(gen|align|obj).c

R=r
OCL=29205
CL=29205
parent d5269d00
......@@ -15,9 +15,9 @@ HFILES=\
OFILES=\
list.$O\
obj.$O\
align.$O\
gen.$O\
gobj.$O\
galign.$O\
ggen.$O\
cgen.$O\
gsubr.$O\
peep.$O\
......
......@@ -3970,9 +3970,11 @@ structlit(Node *n, Node *var)
r = listfirst(&saver, &n->left);
if(r != N && r->op == OEMPTY)
r = N;
if(r == N)
return var;
mixflag = 0;
if(r != N && r->op == OKEY) {
if(r->op == OKEY) {
a = nod(OAS, var, N);
addtop = list(addtop, a);
goto loop2;
......@@ -4050,11 +4052,11 @@ arraylit(Node *n, Node *var)
r = N;
while(r != N) {
b++;
if(r->op == OKEY) {
evconst(r->left);
b = nonnegconst(r->left);
}
b++;
if(b > ninit)
ninit = b;
r = listnext(&saver);
......@@ -4064,7 +4066,8 @@ arraylit(Node *n, Node *var)
if(b == -100) {
// flag for [...]
b = ninit;
t = shallow(t);
if(var == N)
t = shallow(t);
t->bound = b;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment