@@ -40,7 +40,7 @@ implementation
4040
4141 uses
4242 SysUtils,
43- globtype,systems,tokens,
43+ globtype,systems,tokens,constexp,
4444 cutils,cfileutl,cclasses,comphook,
4545 globals,verbose,finput,fppu,globstat,fpcp,fpkg,
4646 symconst,symbase,symtype,symdef,symsym,symtable,defutil,symcreat,
@@ -1206,6 +1206,12 @@ current_module.rtti_directive.options:=class_tobject.rtti.options;
12061206 cderefnode.create(ctypeconvnode.create_internal(
12071207 cloadnode.create(psym,psym.owner),
12081208 cpointerdef.getreusable(tprocvardef(curr.parfor_nested_pvd))))));
1209+ { the thread return value is never read, but leaving the result
1210+ unassigned makes dfa warn about an uninitialized function result
1211+ at the first parallel loop of the module }
1212+ addstatement(stat,cassignmentnode.create(
1213+ cloadnode.create(thunkpd.funcretsym,thunkpd.funcretsym.owner),
1214+ cordconstnode.create(0 ,ptrsinttype,false)));
12091215 typecheckpass(body);
12101216 thunkpi.code:=body;
12111217 symtablestack.pop(thunkpd.localst);
0 commit comments