]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/gdb1250.c
Update copyright year range in all GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / gdb1250.c
CommitLineData
98a23b3f
MC
1/* Test program for stack trace through noreturn function.
2
3666a048 3 Copyright 2003-2021 Free Software Foundation, Inc.
98a23b3f
MC
4
5 This file is part of the gdb testsuite.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
98a23b3f
MC
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>.
98a23b3f
MC
19
20 This file was written by Michael Elizabeth Chastain (mec@shout.net). */
21
22#include <stdlib.h>
23
24int global = 0;
25
04ed252f
MC
26/* Foo, gcc thinks 'gamma' is a reserved identifier.
27 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12213
28 I am not interested in testing that point so just avoid the word.
29 -- chastain 2003-09-08. */
30void my_gamma (int *parray)
98a23b3f
MC
31{
32 return;
33}
34
35void beta ()
36{
37 int array [4];
38 array [0] = global++;
39 array [1] = global++;
40 array [2] = global++;
41 array [3] = global++;
04ed252f 42 my_gamma (array);
98a23b3f
MC
43 abort ();
44}
45
46int alpha ()
47{
48 global++;
49 beta ();
50 return 0;
51}
52
53int main ()
54{
55 int i;
56 global++;
57 i = alpha ();
58 return i;
59}