Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gdb6 / gdb / testsuite / gdb.base / gdb1250.c
blob0af58d92fcb6b97972d7be031c1c3c89a7c7b952
1 /* Test program for stack trace through noreturn function.
3 Copyright 2003 Free Software Foundation, Inc.
5 This file is part of the gdb testsuite.
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.
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.
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.
22 This file was written by Michael Elizabeth Chastain (mec@shout.net). */
24 #include <stdlib.h>
26 int global = 0;
28 /* Foo, gcc thinks 'gamma' is a reserved identifier.
29 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12213
30 I am not interested in testing that point so just avoid the word.
31 -- chastain 2003-09-08. */
32 void my_gamma (int *parray)
34 return;
37 void beta ()
39 int array [4];
40 array [0] = global++;
41 array [1] = global++;
42 array [2] = global++;
43 array [3] = global++;
44 my_gamma (array);
45 abort ();
48 int alpha ()
50 global++;
51 beta ();
52 return 0;
55 int main ()
57 int i;
58 global++;
59 i = alpha ();
60 return i;