* fixed wrong uninitialized warnings with passing array elements

as out-parameters

git-svn-id: trunk@8337 -
This commit is contained in:
Jonas Maebe 2007-08-29 20:23:59 +00:00
parent 1235b05908
commit b1631b6918
3 changed files with 20 additions and 1 deletions

1
.gitattributes vendored
View File

@ -6365,6 +6365,7 @@ tests/tbs/tb0538.pp svneol=native#text/plain
tests/tbs/tb0539.pp svneol=native#text/plain
tests/tbs/tb0540.pp svneol=native#text/x-pascal
tests/tbs/tb0541.pp svneol=native#text/plain
tests/tbs/tb0542.pp svneol=native#text/plain
tests/tbs/ub0060.pp svneol=native#text/plain
tests/tbs/ub0069.pp svneol=native#text/plain
tests/tbs/ub0119.pp svneol=native#text/plain

View File

@ -1006,7 +1006,12 @@ implementation
begin
case parasym.varspez of
vs_out :
begin
{ first set written separately to avoid false }
{ uninitialized warnings (tbs/tb0542) }
set_varstate(left,vs_written,[]);
set_varstate(left,vs_readwritten,[]);
end;
vs_var :
set_varstate(left,vs_readwritten,[vsf_must_be_valid,vsf_use_hints]);
else

13
tests/tbs/tb0542.pp Normal file
View File

@ -0,0 +1,13 @@
{ %norun }
{ %opt=-Sew }
procedure t;
var
f:array[1..10] of text;
begin
assign(f[1],paramstr(0));
end;
begin
t;
end.