blob: ce879a9c409e147fc453286d341813ec4ddc07fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ %version=1.1 }
{ %opt=-gh }
{ Source provided for Free Pascal Bug Report 2911 }
{ Submitted by "Chris Hilder" on 2004-01-19 }
{ e-mail: cj.hilder@astronomyinyourhands.com }
program bug_demo;
{$ifdef fpc}{$Mode objfpc}{$endif}
{$LONGSTRINGS ON}
type
RecordWithStrings =
record
one,
two : string;
end;
var
onestring,
twostring : string;
ARecordWithStrings : RecordWithStrings;
function FunctionResultIsRecord(a : RecordWithStrings) : RecordWithStrings;
begin
result := a;
end;
begin
HaltOnNotReleased := true;
onestring := 'one';
twostring := 'two';
ARecordWithStrings.one := onestring + twostring;
twostring := onestring + twostring;
ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
twostring := onestring + twostring;
ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
twostring := onestring + twostring;
ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
twostring := onestring + twostring;
end.
|