mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 02:27:56 +02:00
42 lines
1.1 KiB
ObjectPascal
42 lines
1.1 KiB
ObjectPascal
{ %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.
|