Update copyright year range in all GDB files.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / local-static.c
index 5bfff8d662dea3afe64b00825e6c78674a93c5c6..4415d27a7d6b03fb4c158e43fd8484e002fd34c0 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -53,10 +53,17 @@ struct S
   }
 
   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 ()
@@ -64,6 +71,24 @@ 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 ()
 {
@@ -120,13 +145,18 @@ free_inline_func (void)
 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 ();
This page took 0.02487 seconds and 4 git commands to generate.