aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-12-01 23:16:44 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-12-01 23:16:44 +0000
commitac1349b75a77e0fc0e8b76a69bfcf246936e721c (patch)
tree3e388879855ef205b46115ba6111266e936b8509 /gdb/testsuite
parentea135989a111fbd9021e5b465a865412c3b2b1a9 (diff)
downloadgdb-ac1349b75a77e0fc0e8b76a69bfcf246936e721c.zip
gdb-ac1349b75a77e0fc0e8b76a69bfcf246936e721c.tar.gz
gdb-ac1349b75a77e0fc0e8b76a69bfcf246936e721c.tar.bz2
Make sure all types in gdb.ada/homonym testcase are used...
Otherwise, the compiler does not generate any debug info for them. This fixes 3 FAILs: FAIL: gdb.ada/homonym.exp: ptype local_type_subtype at BREAK_1 FAIL: gdb.ada/homonym.exp: ptype int_type at BREAK_1 FAIL: gdb.ada/homonym.exp: ptype local_type_subtype at BREAK_2 gdb/testsuite/ChangeLog: * gdb.ada/homonym/pck.ads, gdb.ada/homonym/pck.adb: New files. * gdb.ada/homonym/homonym.adb: For use of all types defined locally inside both Get_Value subprograms.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.ada/homonym/homonym.adb10
-rw-r--r--gdb/testsuite/gdb.ada/homonym/pck.adb21
-rw-r--r--gdb/testsuite/gdb.ada/homonym/pck.ads19
4 files changed, 56 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 965571d..341ce06 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-01 Joel Brobecker <brobecker@adacore.com>
+
+ * gdb.ada/homonym/pck.ads, gdb.ada/homonym/pck.adb: New files.
+ * gdb.ada/homonym/homonym.adb: For use of all types defined
+ locally inside both Get_Value subprograms.
+
2011-12-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix racy FAILs.
diff --git a/gdb/testsuite/gdb.ada/homonym/homonym.adb b/gdb/testsuite/gdb.ada/homonym/homonym.adb
index f459728..43ba23f 100644
--- a/gdb/testsuite/gdb.ada/homonym/homonym.adb
+++ b/gdb/testsuite/gdb.ada/homonym/homonym.adb
@@ -13,6 +13,8 @@
-- 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; use Pck;
+
package body Homonym is
type Integer_Range is new Integer range -100 .. 100;
@@ -28,7 +30,11 @@ package body Homonym is
subtype Local_Type_Subtype is Local_Type;
subtype Int_Type is Integer_Range;
Lcl : Local_Type := 29;
+ Some_Local_Type_Subtype : Local_Type_Subtype := Lcl;
+ I : Int_Type := 1;
begin
+ Do_Nothing (Some_Local_Type_Subtype'Address);
+ Do_Nothing (I'Address);
return Lcl; -- BREAK_1
end Get_Value;
@@ -42,7 +48,11 @@ package body Homonym is
subtype Local_Type_Subtype is Local_Type;
subtype Pos_Type is Positive_Range;
Lcl : Local_Type := 17;
+ Some_Local_Type_Subtype : Local_Type_Subtype := Lcl;
+ P : Pos_Type := 2;
begin
+ Do_Nothing (Some_Local_Type_Subtype'Address);
+ Do_Nothing (P'Address);
return Lcl; -- BREAK_2
end Get_Value;
diff --git a/gdb/testsuite/gdb.ada/homonym/pck.adb b/gdb/testsuite/gdb.ada/homonym/pck.adb
new file mode 100644
index 0000000..114fe03
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/homonym/pck.adb
@@ -0,0 +1,21 @@
+-- Copyright 2011 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 : System.Address) is
+ begin
+ null;
+ end Do_Nothing;
+end Pck;
diff --git a/gdb/testsuite/gdb.ada/homonym/pck.ads b/gdb/testsuite/gdb.ada/homonym/pck.ads
new file mode 100644
index 0000000..f8a4ed5
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/homonym/pck.ads
@@ -0,0 +1,19 @@
+-- Copyright 2011 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 System;
+package Pck is
+ procedure Do_Nothing (A : System.Address);
+end Pck;