forsyth: static and extern volatile deoptimization Reference: /n/atom/patch/applied/ccexternvolatile Date: Sun Aug 16 01:35:44 CES 2015 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/6c/reg.c Sun Aug 16 01:35:34 2015 +++ /sys/src/cmd/6c/reg.c Sun Aug 16 01:35:36 2015 @@ -732,6 +732,7 @@ r->regu |= doregbits(t); r->regu |= doregbits(a->index); + s = a->sym; switch(t) { default: goto none; @@ -744,12 +745,13 @@ goto none; case D_EXTERN: case D_STATIC: + if(s->type != nil && s->type->garb & GVOLATILE) + goto none; case D_PARAM: case D_AUTO: n = t; break; } - s = a->sym; if(s == S) goto none; if(s->name[0] == '.')