aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.pascal/integers.pas
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2008-01-31 14:49:23 +0000
committerPierre Muller <muller@sourceware.org>2008-01-31 14:49:23 +0000
commit2d8fd90a9cfdf639d4f41ba798446893c6a217b8 (patch)
tree134dd1b783a9e95b065e85406a55a743e9cead8e /gdb/testsuite/gdb.pascal/integers.pas
parenta7fa0dedad7e94f3b9691c71c11860c124c24fcc (diff)
downloadbinutils-2d8fd90a9cfdf639d4f41ba798446893c6a217b8.zip
binutils-2d8fd90a9cfdf639d4f41ba798446893c6a217b8.tar.gz
binutils-2d8fd90a9cfdf639d4f41ba798446893c6a217b8.tar.bz2
* gdb.pascal/integers.pas: New test program.
* gdb.pascal/integers.exp: New testcase.
Diffstat (limited to 'gdb/testsuite/gdb.pascal/integers.pas')
-rw-r--r--gdb/testsuite/gdb.pascal/integers.pas51
1 files changed, 51 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.pascal/integers.pas b/gdb/testsuite/gdb.pascal/integers.pas
new file mode 100644
index 0000000..dcc36b3
--- /dev/null
+++ b/gdb/testsuite/gdb.pascal/integers.pas
@@ -0,0 +1,51 @@
+{
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
+
+program integers;
+
+
+function add(a,b : integer) : integer;
+begin
+ add:=a+b;
+end;
+
+function sub(a,b : integer) : integer;
+begin
+ sub:=a-b;
+end;
+
+var
+ i, j, k, l : integer;
+
+begin
+ i := 0;
+ j := 0;
+ k := 0;
+ l := 0; { set breakpoint 1 here }
+ i := 1;
+ j := 2;
+ k := 3;
+ l := k;
+
+ i := j + k;
+
+ j := 0; { set breakpoint 2 here }
+ k := 0;
+ l := add(i,j);
+ l := sub(i,j);
+
+end.