--- branches/vis12/src/compiler/c-target/c-target.sml 2014/11/06 04:17:54 2796 +++ branches/vis12/src/compiler/c-target/c-target.sml 2014/11/06 04:28:54 2797 @@ -248,7 +248,7 @@ CL.mkDeclInit(globTy, "glob", CL.mkIndirect(wrldV, "globals")) :: CL.unBlock init @ [CL.mkReturn(SOME(CL.mkVar "false"))] (* for libraries, we need to make sure that the inputs are initialized *) - val initStms = if not(#exec props) + val initStms = if not(#exec props) andalso #hasInputs props then CL.mkIfThen( CL.mkApply(N.checkDefined props, [wrldV]), CL.mkReturn(SOME(CL.mkBool true))) :: initStms @@ -462,7 +462,7 @@ then (CL.T_Ptr(CL.T_Named(N.globalsTy props)), "globals") :: extras else extras val extras = (CL.T_Ptr CL.uint8, "status") :: extras - val extras = if #exec props + val extras = if #exec props orelse not(#hasInputs props) then extras else (CL.T_Named(N.definedInpTy props), "definedInp") :: extras val extras = if #parallel props