1290001Sglebius/* This testcase is part of GDB, the GNU debugger.
2290001Sglebius
3290001Sglebius   Copyright 2012-2020 Free Software Foundation, Inc.
4290001Sglebius
5290001Sglebius   This program is free software; you can redistribute it and/or modify
6290001Sglebius   it under the terms of the GNU General Public License as published by
7290001Sglebius   the Free Software Foundation; either version 3 of the License, or
8290001Sglebius   (at your option) any later version.
9290001Sglebius
10290001Sglebius   This program is distributed in the hope that it will be useful,
11290001Sglebius   but WITHOUT ANY WARRANTY; without even the implied warranty of
12290001Sglebius   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13290001Sglebius   GNU General Public License for more details.
14290001Sglebius
15290001Sglebius   You should have received a copy of the GNU General Public License
16290001Sglebius   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17290001Sglebius
18290001Sglebiusvolatile int v;
19290001Sglebius
20290001Sglebiusstatic __attribute__ ((noinline, noclone)) void
21290001Sglebiusg (void)
22290001Sglebius{
23290001Sglebius  v = 2;
24290001Sglebius}
25290001Sglebius
26290001Sglebiusstatic __attribute__ ((noinline, noclone)) void
27290001Sglebiusf (void)
28290001Sglebius{
29290001Sglebius  g ();
30290001Sglebius}
31290001Sglebius
32290001Sglebiusint
33290001Sglebiusmain (void)
34290001Sglebius{
35290001Sglebius  v = 1;
36290001Sglebius  f ();
37290001Sglebius  v = 3;
38290001Sglebius  return 0;
39290001Sglebius}
40290001Sglebius