Browse Source

* new bug

peter 21 years ago
parent
commit
df88641d09
1 changed files with 28 additions and 0 deletions
  1. 28 0
      tests/webtbs/tw2794.pp

+ 28 - 0
tests/webtbs/tw2794.pp

@@ -0,0 +1,28 @@
+{ Source provided for Free Pascal Bug Report 2794 }
+{ Submitted by "Johannes Berg" on  2003-11-17 }
+{ e-mail: [email protected] }
+program test;
+{$THREADING ON}
+{$MODE OBJFPC}
+
+uses
+  CThreads,Classes;
+
+type
+  TMyThread = class(TThread)
+    procedure Execute;
+  end;
+
+threadvar
+  x: ansistring;
+
+procedure TMyThread.Execute;
+begin
+  x := 'asdf';
+  x := x + x;
+  writeln(x);
+end;
+
+begin
+  TMyThread.Create(false).Free;
+end.