mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:29:14 +02:00
+ more test to validate FPC/SPARC
This commit is contained in:
parent
63f08813bc
commit
515af60a33
20
tests/sparc/test0002.pas
Normal file
20
tests/sparc/test0002.pas
Normal file
@ -0,0 +1,20 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
x,y:Cardinal;
|
||||
z:0..255;
|
||||
FUNCTION CopyMe(x:Cardinal):Cardinal;
|
||||
BEGIN
|
||||
CopyMe:=x;
|
||||
END;
|
||||
FUNCTION Add(a,b:Cardinal):Cardinal;
|
||||
BEGIN
|
||||
Add:=a+b;
|
||||
END;
|
||||
BEGIN
|
||||
y:=0;
|
||||
z:=0;
|
||||
x:=1+y;
|
||||
x:=Add(x,y);
|
||||
END.
|
20
tests/sparc/test0003.pas
Normal file
20
tests/sparc/test0003.pas
Normal file
@ -0,0 +1,20 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
x,y:Cardinal;
|
||||
z:0..255;
|
||||
FUNCTION CopyMe(x:Cardinal):Cardinal;
|
||||
BEGIN
|
||||
CopyMe:=x;
|
||||
END;
|
||||
FUNCTION Add(a,b:Cardinal):Cardinal;
|
||||
BEGIN
|
||||
Add:=a+b;
|
||||
END;
|
||||
BEGIN
|
||||
y:=0;
|
||||
z:=0;
|
||||
x:=1+y;
|
||||
x:=Add(x,y);
|
||||
END.
|
Loading…
Reference in New Issue
Block a user