blob: f5d0eaf1e74c6ec24a2b11f4dbfabb1923a4605c (
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
|
{ %fail }
{ %opt=-Sew }
{ This is a border case:
the result could be considered to reside only in
the function result register,
in which case no stack space would be required... }
{ This is the reason of the -Sew option,
this test must fail because a warning sould be issued
about nostackframe without assembler.
Please do not remove -Sew option. PM 2012-10-17 }
function test : longint; nostackframe;
begin
test:=5;
end;
begin
if test<>5 then
begin
writeln('Wrong result in nostackframe non-assembler function');
halt(1);
end
else
writeln('Pascal function nostackframe works OK');
end.
|