]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.cc
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / missing-type-name-for-templates.cc
1 /* Copyright (C) 2022-2024 Free Software Foundation, Inc.
2
3 This file is part of GDB.
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
18 template<typename first, typename second>
19 class template_var1
20 {
21 first me;
22 second me2;
23 };
24
25 template<typename first, typename second>
26 class template_var2
27 {
28 first me;
29 second me2;
30 };
31
32 template<int val1, typename first, int val2, typename second>
33 class template_var3
34 {
35 first me;
36 second me2;
37 };
38
39 template<typename, typename second>
40 class template_var1;
41
42 template<typename, typename>
43 class template_var2;
44
45 template<int, typename, int, typename>
46 class template_var3;
47
48 int
49 main (int argc, char **argv)
50 {
51 asm ("main_label: .globl main_label");
52
53 template_var1<int, float> var1;
54 template_var2<int, float> var2;
55 template_var3<0, int, 11, float> var3;
56
57 return 0;
58 }