]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.cp/cpexprs.exp
Canonicalize conversion operators
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / cpexprs.exp
index d0f41b2d8e3334c0fdadb53a7981a2c8cee8b330..463e89c12cdb6f1c01cf216bd3fa6da6c595c064 100644 (file)
@@ -407,6 +407,10 @@ add {base::operator int} \
     {int (const base * const)} \
     - \
     -
+add {base::operator fluff const* const*} \
+    {const fluff * const *(const base * const)} \
+    - \
+    -
 
 # Templates
 add {tclass<char>::do_something} \
@@ -746,5 +750,17 @@ gdb_test "p CV_f(CV::i)" " = 43"
 gdb_test "p CV_f('cpexprs.cc'::CV::t)" \
     { = {int \(int\)} 0x[0-9a-f]+ <CV_f\(int\)>}
 
+# Make sure conversion operator names are canonicalized and properly
+# "spelled."
+gdb_test "p base::operator const fluff * const *" \
+    [get "base::operator fluff const* const*" print] \
+    "canonicalized conversion operator name 1"
+gdb_test "p base::operator const fluff* const*" \
+    [get "base::operator fluff const* const*" print] \
+    "canonicalized conversion operator name 2"
+gdb_test "p base::operator derived*" \
+    "There is no field named operator derived\\*" \
+    "undefined conversion operator"
+
 gdb_exit
 return 0