diff options
Diffstat (limited to 'gdb/testsuite/gdb.ada/length_cond')
-rw-r--r-- | gdb/testsuite/gdb.ada/length_cond/length_cond.adb | 37 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/length_cond/pck.adb | 21 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/length_cond/pck.ads | 18 |
3 files changed, 76 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.ada/length_cond/length_cond.adb b/gdb/testsuite/gdb.ada/length_cond/length_cond.adb new file mode 100644 index 0000000..7b563c3 --- /dev/null +++ b/gdb/testsuite/gdb.ada/length_cond/length_cond.adb @@ -0,0 +1,37 @@ +-- Copyright 2019 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/>. + +with Pck; + +procedure Length_Cond is + type Enum is (One, Two, Three); + Enum_Val : Enum := Three; + + type My_Int is range -23 .. 23; + Int_Val : My_Int := 0; + + type My_Array is array (0..1, 0..1) of Boolean; + Array_Val : My_Array := ((True, False), (False, True)); + + procedure p (s : String) is + loc : String := s & "."; + begin + Pck.Do_Nothing (loc); -- BREAKPOINT + end p; +begin + for I in 1 .. 25 loop + p ((1 .. I => 'X')); + end loop; +end Length_Cond; diff --git a/gdb/testsuite/gdb.ada/length_cond/pck.adb b/gdb/testsuite/gdb.ada/length_cond/pck.adb new file mode 100644 index 0000000..79bbe59 --- /dev/null +++ b/gdb/testsuite/gdb.ada/length_cond/pck.adb @@ -0,0 +1,21 @@ +-- Copyright 2019 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/>. + +package body Pck is + procedure Do_Nothing (A : String) is + begin + null; + end Do_Nothing; +end Pck; diff --git a/gdb/testsuite/gdb.ada/length_cond/pck.ads b/gdb/testsuite/gdb.ada/length_cond/pck.ads new file mode 100644 index 0000000..433b389 --- /dev/null +++ b/gdb/testsuite/gdb.ada/length_cond/pck.ads @@ -0,0 +1,18 @@ +-- Copyright 2019 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/>. + +package Pck is + procedure Do_Nothing (A : String); +end Pck; |