Index: gdb/testsuite/gdb.cp/cpexprs.cc |
diff --git a/gdb/testsuite/gdb.cp/cpexprs.cc b/gdb/testsuite/gdb.cp/cpexprs.cc |
index c8c5ac8a2a7919b2f82f97057818c843f852e3f7..f6b355c3d54519b20d034c53ebe160f10c16a86e 100644 |
--- a/gdb/testsuite/gdb.cp/cpexprs.cc |
+++ b/gdb/testsuite/gdb.cp/cpexprs.cc |
@@ -308,6 +308,29 @@ class derived : public base1, public base2 |
int foo_; |
}; |
+class CV { public: |
+ static const int i; |
+ typedef int t; |
+ void m(t); |
+ void m(t) const; |
+ void m(t) volatile; |
+ void m(t) const volatile; |
+}; |
+const int CV::i = 42; |
+#ifdef __GNUC__ |
+# define ATTRIBUTE_USED __attribute__((used)) |
+#else |
+# define ATTRIBUTE_USED |
+#endif |
+ATTRIBUTE_USED void CV::m(CV::t) {} |
+ATTRIBUTE_USED void CV::m(CV::t) const {} |
+ATTRIBUTE_USED void CV::m(CV::t) volatile {} |
+ATTRIBUTE_USED void CV::m(CV::t) const volatile {} |
+int CV_f (int x) |
+{ |
+ return x + 1; |
+} |
+ |
int |
test_function (int argc, char* argv[]) // test_function |
{ // test_function |
@@ -428,6 +451,8 @@ test_function (int argc, char* argv[]) // test_function |
fluff* flp = a; |
fluff** flpp = a; |
+ CV_f(CV::i); |
+ |
return 0; |
} |