* use volatile() to prevent wrong optimizations by llvm

git-svn-id: trunk@40466 -
This commit is contained in:
Jonas Maebe 2018-12-04 19:53:23 +00:00
parent 122d0d36d6
commit 8846041b23

View File

@ -55,7 +55,7 @@ begin
if BeginThread({$ifdef fpc}@{$endif}f,pointer(i)) <> tthreadid(0) then
inc(started);
while finished<started do
while volatile(finished)<started do
{$ifdef wince}sleep(10){$endif};
writeln(finished);
end.