2008-01-25 Douglas Gregor <doug.gregor@gmail.com>
[official-gcc.git] / gcc / testsuite / treelang / output / output-1.c
blob7f12e87852f3718af9c89e56054acecfb221c00c
1 /* Driver for treelang test pgm */
3 /*
5 Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3, or (at your option) any
10 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 GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>.
21 In other words, you are welcome to use, share and improve this program.
22 You are forbidden to forbid anyone else to use, share and improve
23 what you give them. Help stamp out software-hoarding!
24 */
26 int add(int, int);
27 int subtract(int, int);
28 int first_nonzero(int, int);
29 extern int printf(char *template, ...);
31 int
32 main (int argc, char *argv[])
34 printf("2:%d\n", add(1,1));
35 printf("7:%d\n", add(3,4));
36 printf("-1:%d\n", subtract(3,4));
37 printf("1:%d\n", subtract(2,1));
38 printf("3:%d\n", first_nonzero(0,3));
39 printf("0:%d\n", first_nonzero(0,0));
40 printf("1:%d\n", first_nonzero(1,0));
41 printf("15:%d\n", double_plus_one(7));
42 return 0;