[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.compile / compile-cplus-nested.cc
blobced8df067a226c403a9edf3ec623ce50b34f63aa
1 /* Copyright 2015-2019 Free Software Foundation, Inc.
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 class A
18 public:
19 A () : a_ (1) {}
20 int get ();
22 protected:
23 int a_;
25 private:
26 /* It is important to not /not/ use the nested class definition in A.
27 This exercises a different path through the code. */
28 struct Inner1
30 int a_;
31 Inner1 () : a_ (2) {}
33 struct Inner2
35 int a_;
36 Inner2 () : a_ (3) {}
41 int
42 A::get ()
44 A::Inner1 i1;
45 A::Inner1::Inner2 i2;
47 return i1.a_ + i2.a_; // break here
50 int var = 1234;
52 int
53 main ()
55 A a;
57 return a.get ();