]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw2-dir-file-name.c
CommitLineData
1b56eb55
JK
1/* This testcase is part of GDB, the GNU debugger.
2
213516ef 3 Copyright 2012-2023 Free Software Foundation, Inc.
1b56eb55
JK
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18volatile int v;
19
20static void
21marker (void)
22{
23 v++;
24}
25
26/* *R* marks possibly invalid compiler output as the first path component is
27 not absolute. Still DWARF-4 does not forbid such DWARF; GCC does not
28 produce it. */
29
30#define FUNCBLOCK \
31FUNC (compdir_missing__ldir_missing__file_basename) /*R*/\
32FUNC (compdir_missing__ldir_missing__file_relative) /*R*/\
33FUNC (compdir_missing__ldir_missing__file_absolute) \
34FUNC (compdir_missing__ldir_relative_file_basename) /*R*/\
35FUNC (compdir_missing__ldir_relative_file_relative) /*R*/\
36FUNC (compdir_missing__ldir_relative_file_absolute) /*R*/\
37FUNC (compdir_missing__ldir_absolute_file_basename) \
38FUNC (compdir_missing__ldir_absolute_file_relative) \
39FUNC (compdir_missing__ldir_absolute_file_absolute_same) \
40FUNC (compdir_missing__ldir_absolute_file_absolute_different) \
41FUNC (compdir_relative_ldir_missing__file_basename) /*R*/\
42FUNC (compdir_relative_ldir_missing__file_relative) /*R*/\
43FUNC (compdir_relative_ldir_missing__file_absolute) /*R*/\
44FUNC (compdir_relative_ldir_relative_file_basename) /*R*/\
45FUNC (compdir_relative_ldir_relative_file_relative) /*R*/\
46FUNC (compdir_relative_ldir_relative_file_absolute) /*R*/\
47FUNC (compdir_relative_ldir_absolute_file_basename) /*R*/\
48FUNC (compdir_relative_ldir_absolute_file_relative) /*R*/\
49FUNC (compdir_relative_ldir_absolute_file_absolute_same) /*R*/\
50FUNC (compdir_relative_ldir_absolute_file_absolute_different) /*R*/\
51FUNC (compdir_absolute_ldir_missing__file_basename) \
52FUNC (compdir_absolute_ldir_missing__file_relative) \
53FUNC (compdir_absolute_ldir_missing__file_absolute_same) \
54FUNC (compdir_absolute_ldir_missing__file_absolute_different) \
55FUNC (compdir_absolute_ldir_relative_file_basename) \
56FUNC (compdir_absolute_ldir_relative_file_relative) \
57FUNC (compdir_absolute_ldir_relative_file_absolute_same) \
58FUNC (compdir_absolute_ldir_relative_file_absolute_different) \
59FUNC (compdir_absolute_ldir_absolute_file_basename_same) \
60FUNC (compdir_absolute_ldir_absolute_file_basename_different) \
61FUNC (compdir_absolute_ldir_absolute_file_relative_same) \
62FUNC (compdir_absolute_ldir_absolute_file_relative_different) \
63FUNC (compdir_absolute_ldir_absolute_file_absolute_same) \
64FUNC (compdir_absolute_ldir_absolute_file_absolute_different)
65
66#define FUNC(name) \
20fa3390 67 static void \
1b56eb55
JK
68 name (void) \
69 { \
9e338b14 70 asm (#name "_label: .globl " #name "_label\n"); \
1b56eb55 71 v++; \
9e338b14 72 }
1b56eb55
JK
73FUNCBLOCK
74#undef FUNC
75
76int
77main (void)
78{
79
80#define FUNC(name) \
81 name ();
82FUNCBLOCK
83#undef FUNC
84
85 return 0;
86}