OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [treelang/] [output/] [output-1.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Driver for treelang test pgm */
2
 
3
/*
4
 
5
  Copyright (C) 2001, 2002 Free Software Foundation, Inc.
6
 
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 2, or (at your option) any
10
  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, 51 Franklin Street, Fifth Floor,
20
  Boston, MA 02110-1301, USA.
21
 
22
  In other words, you are welcome to use, share and improve this program.
23
  You are forbidden to forbid anyone else to use, share and improve
24
  what you give them.   Help stamp out software-hoarding!
25
*/
26
 
27
int add(int, int);
28
int subtract(int, int);
29
int first_nonzero(int, int);
30
extern int printf(char *template, ...);
31
 
32
int
33
main (int argc, char *argv[])
34
{
35
  printf("2:%d\n", add(1,1));
36
  printf("7:%d\n", add(3,4));
37
  printf("-1:%d\n", subtract(3,4));
38
  printf("1:%d\n", subtract(2,1));
39
  printf("3:%d\n", first_nonzero(0,3));
40
  printf("0:%d\n", first_nonzero(0,0));
41
  printf("1:%d\n", first_nonzero(1,0));
42
  printf("15:%d\n", double_plus_one(7));
43
  return 0;
44
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.