aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog12
-rw-r--r--gdb/testsuite/gdb.cp/oranking.cc22
-rw-r--r--gdb/testsuite/gdb.cp/oranking.exp9
-rw-r--r--gdb/testsuite/gdb.cp/rvalue-ref-overload.exp1
-rw-r--r--gdb/testsuite/gdb.cp/rvalue-ref-params.exp1
5 files changed, 39 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c4d5b79..a835a40 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2017-04-27 Keith Seitz <keiths@redhat.com>
+
+ * gdb.cp/oranking.cc (test15): New function.
+ (main): Call test15 and declare additional variables for testing.
+ * gdb.cp/oranking.exp: Remove kfail status for "p foo4(&a)" and
+ "p foo101('abc')" tests.
+ Add tests for cv qualifier overloads.
+ * gdb.cp/rvalue-ref-overloads.exp: Remove kfail status for
+ "lvalue reference overload" test.
+ * gdb.cp/rvalue-ref-params.exp: Remove kfail status for
+ "print value of f1 on Child&& in f2" test.
+
2017-04-19 Pedro Alves <palves@redhat.com>
* gdb.threads/threadapply.exp (kill_and_remove_inferior): New
diff --git a/gdb/testsuite/gdb.cp/oranking.cc b/gdb/testsuite/gdb.cp/oranking.cc
index dc1972a..bd2f51b 100644
--- a/gdb/testsuite/gdb.cp/oranking.cc
+++ b/gdb/testsuite/gdb.cp/oranking.cc
@@ -147,6 +147,23 @@ int test14 (){
return foo14(e); // 46
}
+/* Test cv qualifier overloads. */
+int foo15 (char *arg) { return 47; }
+int foo15 (const char *arg) { return 48; }
+int foo15 (volatile char *arg) { return 49; }
+int foo15 (const volatile char *arg) { return 50; }
+static int
+test15 ()
+{
+ char *c = 0;
+ const char *cc = 0;
+ volatile char *vc = 0;
+ const volatile char *cvc = 0;
+
+ // 47 + 48 + 49 + 50 = 194
+ return foo15 (c) + foo15 (cc) + foo15 (vc) + foo15 (cvc);
+}
+
int main() {
B b;
foo0(b);
@@ -203,5 +220,10 @@ int main() {
foo14(e);
test14();
+ const char *cc = 0;
+ volatile char *vc = 0;
+ const volatile char *cvc = 0;
+ test15 ();
+
return 0; // end of main
}
diff --git a/gdb/testsuite/gdb.cp/oranking.exp b/gdb/testsuite/gdb.cp/oranking.exp
index 69efb0c..dc7c78b 100644
--- a/gdb/testsuite/gdb.cp/oranking.exp
+++ b/gdb/testsuite/gdb.cp/oranking.exp
@@ -48,7 +48,6 @@ gdb_test "p test3()" "21"
gdb_test "p foo3(1.0f)" "21"
gdb_test "p test4()" "24"
-setup_kfail "gdb/12098" *-*-*
gdb_test "p foo4(&a)" "24"
gdb_test "p test5()" "26"
@@ -71,7 +70,6 @@ setup_kfail "gdb/12098" *-*-*
gdb_test "p foo10(amp)" "216"
gdb_test "p test101()" "218"
-setup_kfail "gdb/12098" *-*-*
gdb_test "p foo101(\"abc\")" "218"
gdb_test "p test11()" "32"
@@ -91,5 +89,8 @@ gdb_test "p test14()" "46"
setup_kfail "gdb/12096" *-*-*
gdb_test "p foo14(e)" "46"
-
-
+gdb_test "p test15 ()" "194"
+gdb_test "p foo15 (c)" "47"
+gdb_test "p foo15 (cc)" "48"
+gdb_test "p foo15 (vc)" "49"
+gdb_test "p foo15 (cvc)" "50"
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
index e729209..5cfd34e 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
@@ -60,7 +60,6 @@ gdb_test "print foo_rr_instance1.overload1arg(static_cast<foo&&>(arg))" \
"print call overloaded func foo && arg"
# Test lvalue vs rvalue function overloads
-setup_kfail "c++/15372" "*-*-*"
gdb_test "print f (i)" "= 1" "lvalue reference overload"
gdb_test "print f (ci)" "= 2" "lvalue reference to const overload"
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
index 303b447..611b592 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
@@ -48,7 +48,6 @@ set t "print value of Child&& in f2"
gdb_start_again "marker2 here" $t
gdb_test "print C" ".*id = 42.*" $t
-setup_kfail "c++/15372" "*-*-*"
gdb_test "print f1 (static_cast<Child&&> (C))" ".* = 42.*" \
"print value of f1 on Child&& in f2"