/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2017 Free Software Foundation, Inc.
+ Copyright 2002-2020 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
}
void method ();
+ void method () const;
+ void method () volatile;
+ void method () volatile const;
+
static void static_method ();
};
S s;
+const S c_s = {};
+volatile S v_s = {};
+const volatile S cv_s = {};
void
S::method ()
DEF_STATICS (S_M);
}
+void
+S::method () const
+{
+ DEF_STATICS (S_M_C);
+}
+
+void
+S::method () volatile
+{
+ DEF_STATICS (S_M_V);
+}
+
+void
+S::method () const volatile
+{
+ DEF_STATICS (S_M_CV);
+}
+
void
S::static_method ()
{
int
main ()
{
- for (int i = 0; i < 1000; i++)
+ int i;
+
+ for (i = 0; i < 1000; i++)
{
free_func ();
free_inline_func ();
#ifdef __cplusplus
s.method ();
+ c_s.method ();
+ v_s.method ();
+ cv_s.method ();
s.inline_method ();
S::static_method ();
S::static_inline_method ();