2003-07-15 Michael Chastain <mec@shout.net>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / gdb1250.c
1 /* Test program for stack trace through noreturn function.
2
3 Copyright 2003 Free Software Foundation, Inc.
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
9 the Free Software Foundation; either version 2 of the License, or
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
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
21
22 This file was written by Michael Elizabeth Chastain (mec@shout.net). */
23
24 #include <stdlib.h>
25
26 int global = 0;
27
28 void gamma (int *parray)
29 {
30 return;
31 }
32
33 void beta ()
34 {
35 int array [4];
36 array [0] = global++;
37 array [1] = global++;
38 array [2] = global++;
39 array [3] = global++;
40 gamma (array);
41 abort ();
42 }
43
44 int alpha ()
45 {
46 global++;
47 beta ();
48 return 0;
49 }
50
51 int main ()
52 {
53 int i;
54 global++;
55 i = alpha ();
56 return i;
57 }
This page took 0.033252 seconds and 5 git commands to generate.