* check zero-extending of parameters < sizeof(aint)

git-svn-id: trunk@3656 -
This commit is contained in:
Jonas Maebe 2006-05-24 15:16:38 +00:00
parent d1e262d18c
commit ea86114f96
2 changed files with 46 additions and 0 deletions

1
.gitattributes vendored
View File

@ -5539,6 +5539,7 @@ tests/test/cg/tcalpvr6.pp svneol=native#text/plain
tests/test/cg/tcalpvr7.pp svneol=native#text/plain
tests/test/cg/tcalpvr8.pp svneol=native#text/plain
tests/test/cg/tcalval1.pp svneol=native#text/plain
tests/test/cg/tcalval10.pp -text
tests/test/cg/tcalval2.pp svneol=native#text/plain
tests/test/cg/tcalval3.pp svneol=native#text/plain
tests/test/cg/tcalval4.pp svneol=native#text/plain

View File

@ -0,0 +1,45 @@
{ %target=darwin }
type
tr= packed record
b1, b2: byte;
end;
procedure test(b: tr);mwpascal;
begin
if b.b2 <> 5 then
halt(1);
end;
procedure t;
var
r: tr;
begin
r.b2 := 5;
test(r);
end;
procedure t2(b: byte); mwpascal;
var
p: plongint;
begin
p := plongint(@b);
if p^ <> 1 then
halt(2);
end;
procedure t3;
var
b,b2,b3,b4: byte;
begin
b := 1;
b2 := 2;
b3 := 3;
b4 := 4;
t2(b);
end;
begin
t;
t3;
end.