1 /* Copyright 2019-2020 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 /* This test relies on foo being inlined into main and bar not being
17 inlined. The test is checking GDB's behaviour as we single step from
18 main through foo and into bar. */
20 volatile int global_var
;
22 int __attribute__ ((noinline
))
25 asm ("bar_label: .globl bar_label");
26 return global_var
; /* bar return global_var */
29 static inline int __attribute__ ((always_inline
))
32 return bar (); /* foo call bar */
39 asm ("main_label: .globl main_label");
40 global_var
= 0; /* main set global_var */
41 asm ("main_label2: .globl main_label2");
42 ans
= foo (); /* main call foo */
43 asm ("main_label3: .globl main_label3");
This page took 0.038587 seconds and 4 git commands to generate.