1ed6a76a9Schristos /* This testcase is part of GDB, the GNU debugger.
2ed6a76a9Schristos 
3*1424dfb3Schristos    Copyright 2014-2020 Free Software Foundation, Inc.
4ed6a76a9Schristos 
5ed6a76a9Schristos    This program is free software; you can redistribute it and/or modify
6ed6a76a9Schristos    it under the terms of the GNU General Public License as published by
7ed6a76a9Schristos    the Free Software Foundation; either version 3 of the License, or
8ed6a76a9Schristos    (at your option) any later version.
9ed6a76a9Schristos 
10ed6a76a9Schristos    This program is distributed in the hope that it will be useful,
11ed6a76a9Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
12ed6a76a9Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13ed6a76a9Schristos    GNU General Public License for more details.
14ed6a76a9Schristos 
15ed6a76a9Schristos    You should have received a copy of the GNU General Public License
16ed6a76a9Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17ed6a76a9Schristos 
18ed6a76a9Schristos int global = 3;
19ed6a76a9Schristos 
20ed6a76a9Schristos class C {
21ed6a76a9Schristos public:
22ed6a76a9Schristos   struct C1 {} C1;
23ed6a76a9Schristos   enum E1 {a1, b1, c1} E1;
24ed6a76a9Schristos   union U1 {int a1; char b1;} U1;
25ed6a76a9Schristos 
C()26ed6a76a9Schristos   C () : E1 (b1) {}
global(void) const27ed6a76a9Schristos   void global (void) const {}
f(void) const28ed6a76a9Schristos   int f (void) const { global (); return 0; }
29ed6a76a9Schristos } C;
30ed6a76a9Schristos 
31ed6a76a9Schristos struct S {} S;
32ed6a76a9Schristos enum E {a, b, c} E;
33ed6a76a9Schristos union U {int a; char b;} U;
34ed6a76a9Schristos 
35ed6a76a9Schristos class CC {} cc;
36ed6a76a9Schristos struct SS {} ss;
37ed6a76a9Schristos enum EE {ea, eb, ec} ee;
38ed6a76a9Schristos union UU {int aa; char bb;} uu;
39ed6a76a9Schristos 
40ed6a76a9Schristos int
main(void)41ed6a76a9Schristos main (void)
42ed6a76a9Schristos {
43ed6a76a9Schristos   return C.f ();
44ed6a76a9Schristos }
45