mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 17:50:18 +02:00
* all types with inittable need a persistant temp
git-svn-id: trunk@1472 -
This commit is contained in:
parent
adfd36d189
commit
0981495c7b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6289,6 +6289,7 @@ tests/webtbs/tw4089.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw4093.pp svneol=native#text/plain
|
tests/webtbs/tw4093.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4098.pp svneol=native#text/plain
|
tests/webtbs/tw4098.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4100.pp svneol=native#text/plain
|
tests/webtbs/tw4100.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw4104.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4115.pp svneol=native#text/plain
|
tests/webtbs/tw4115.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4119.pp svneol=native#text/plain
|
tests/webtbs/tw4119.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4140.pp svneol=native#text/plain
|
tests/webtbs/tw4140.pp svneol=native#text/plain
|
||||||
|
@ -850,24 +850,10 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if is_ansistring(lt) then
|
if is_ansistring(lt) then
|
||||||
{$ifdef ansistring_bits}
|
|
||||||
begin
|
|
||||||
case Tstringdef(lt).string_typ of
|
|
||||||
st_ansistring16:
|
|
||||||
vtype:=vtAnsiString16;
|
|
||||||
st_ansistring32:
|
|
||||||
vtype:=vtAnsiString32;
|
|
||||||
st_ansistring64:
|
|
||||||
vtype:=vtAnsiString64;
|
|
||||||
end;
|
|
||||||
freetemp:=false;
|
|
||||||
end
|
|
||||||
{$else}
|
|
||||||
begin
|
begin
|
||||||
vtype:=vtAnsiString;
|
vtype:=vtAnsiString;
|
||||||
freetemp:=false;
|
freetemp:=false;
|
||||||
end
|
end
|
||||||
{$endif}
|
|
||||||
else
|
else
|
||||||
if is_widestring(lt) then
|
if is_widestring(lt) then
|
||||||
begin
|
begin
|
||||||
@ -898,9 +884,7 @@ implementation
|
|||||||
else
|
else
|
||||||
{ normal array constructor of the same type }
|
{ normal array constructor of the same type }
|
||||||
begin
|
begin
|
||||||
if (is_ansistring(left.resulttype.def) or
|
if resulttype.def.needs_inittable then
|
||||||
is_widestring(left.resulttype.def) or
|
|
||||||
(left.resulttype.def.deftype=variantdef)) then
|
|
||||||
freetemp:=false;
|
freetemp:=false;
|
||||||
case hp.left.location.loc of
|
case hp.left.location.loc of
|
||||||
LOC_FPUREGISTER,
|
LOC_FPUREGISTER,
|
||||||
|
31
tests/webtbs/tw4104.pp
Executable file
31
tests/webtbs/tw4104.pp
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 4104 }
|
||||||
|
{ Submitted by "Daniël Mantione" on 2005-06-22 }
|
||||||
|
{ e-mail: daniel@freepascal.org }
|
||||||
|
program bug;
|
||||||
|
|
||||||
|
type junk=record
|
||||||
|
data:ansistring;
|
||||||
|
end;
|
||||||
|
|
||||||
|
operator :=(x:longint) result:junk;
|
||||||
|
|
||||||
|
begin
|
||||||
|
str(x,result.data);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure write_junk(const data:array of junk);
|
||||||
|
|
||||||
|
var i:cardinal;
|
||||||
|
|
||||||
|
begin
|
||||||
|
for i:=low(data) to high(data) do
|
||||||
|
begin
|
||||||
|
write(data[i].data);
|
||||||
|
write('<-->');
|
||||||
|
writeln(Pchar(data[i].data));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
write_junk([1,2]);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user