From 293c9a3b315d27a44e0c025b0c189adc8f5fd91d Mon Sep 17 00:00:00 2001 From: Yashas Date: Thu, 10 May 2018 23:01:52 +0530 Subject: [PATCH] mark symbols passed as non-const args modified This commit makes the compiler mark array symbols which are passed as non-const argument modified. --- source/compiler/sc3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/compiler/sc3.c b/source/compiler/sc3.c index c3d9584..af3f2b8 100644 --- a/source/compiler/sc3.c +++ b/source/compiler/sc3.c @@ -2274,7 +2274,8 @@ static int nesting=0; check_tagmismatch_multiple(arg[argidx].tags,arg[argidx].numtags,lval.tag,-1); if (lval.tag!=0) append_constval(&taglst,arg[argidx].name,lval.tag,0); - // ??? set uWRITTEN? + if (lval.sym!=NULL && (arg[argidx].usage & uCONST)==0) + markusage(lval.sym,uWRITTEN); argidx++; /* argument done */ break; } /* switch */