From 81044b4cffe5c13d9996772a3786d4a52f59bd3d Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 16 Feb 2018 15:27:52 +0000 Subject: [PATCH] + extended test tasm20.pp with a function, which checks that a shortstring parameter doesn't get copied to a local variable in a pure asm routine git-svn-id: trunk@38249 - --- tests/test/tasm20.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test/tasm20.pp b/tests/test/tasm20.pp index ff6a8b22c0..5f2f526e35 100644 --- a/tests/test/tasm20.pp +++ b/tests/test/tasm20.pp @@ -106,6 +106,11 @@ asm stosb end; +procedure myfunc5(s: string); assembler; +asm + mov actual_sp, sp +end; + procedure Error; begin Writeln('Error!'); @@ -128,5 +133,8 @@ begin res4 := myfunc4; if (res4 <> 'Tralala') and ((expect_sp - actual_sp) <> (2 + SizeOf(Pointer))) then Error; + myfunc5('Test'); + if (expect_sp - actual_sp) <> (2 + SizeOf(Pointer)) then + Error; Writeln('Ok!'); end.