xref: /netbsd-src/external/gpl3/gdb/dist/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.c (revision 3f351f34c6d827cf017cdcff3543f6ec0c88b420)
1 /* Copyright 2022-2023 Free Software Foundation, Inc.
2 
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.
7 
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.
12 
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/>.  */
15 
16 
17 int
18 main (void)
19 {							/* main prologue */
20   asm ("main_label: .global main_label");
21   int m = 42;						/* main assign m */
22   asm ("main_assign_n: .global main_assign_n");
23   int n = 54;						/* main assign n */
24   asm ("main_end_prologue: .global main_end_prologue");
25   int o = 96;						/* main assign o */
26   asm ("main_end: .global main_end");			/* main end */
27   return m + n - o;
28 }
29