aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.cp/ptype-cv-cp.cc4
-rw-r--r--gdb/testsuite/gdb.cp/ptype-cv-cp.exp12
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/ptype-cv-cp.cc b/gdb/testsuite/gdb.cp/ptype-cv-cp.cc
index 9560dfa..27dc2f1 100644
--- a/gdb/testsuite/gdb.cp/ptype-cv-cp.cc
+++ b/gdb/testsuite/gdb.cp/ptype-cv-cp.cc
@@ -26,6 +26,10 @@ __attribute__((used)) const_my_int v_const_my_int (1);
volatile_my_int v_volatile_my_int (2);
const_volatile_my_int v_const_volatile_my_int (3);
volatile_const_my_int v_volatile_const_my_int (4);
+__attribute__((used)) const my_int v2_const_my_int (5);
+volatile my_int v2_volatile_my_int (6);
+const volatile my_int v2_const_volatile_my_int (7);
+volatile const my_int v2_volatile_const_my_int (8);
int
main ()
diff --git a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
index b3574cb..5518a4e 100644
--- a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
+++ b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
@@ -41,3 +41,15 @@ if {[test_compiler_info {gcc-[0-3]-*}]
setup_xfail "gcc/45997" "*-*-*"
}
gdb_test "ptype v_volatile_const_my_int" "type = const volatile int"
+
+gdb_test "ptype v2_const_my_int" "type = const int"
+gdb_test "whatis v2_const_my_int" "type = const my_int"
+
+gdb_test "ptype v2_volatile_my_int" "type = volatile int"
+gdb_test "whatis v2_volatile_my_int" "type = volatile my_int"
+
+gdb_test "ptype v2_const_volatile_my_int" "type = const volatile int"
+gdb_test "whatis v2_const_volatile_my_int" "type = const volatile my_int"
+
+gdb_test "ptype v2_volatile_const_my_int" "type = const volatile int"
+gdb_test "whatis v2_volatile_const_my_int" "type = const volatile my_int"