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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [treelang/] [output/] [output-1.c] - Blame information for rev 827

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Driver for treelang test pgm */
2
 
3
/*
4
 
5
  Copyright (C) 2001, 2002, 2007 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 3, 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 GCC; see the file COPYING3.  If not see
19
  <http://www.gnu.org/licenses/>.
20
 
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
*/
25
 
26
int add(int, int);
27
int subtract(int, int);
28
int first_nonzero(int, int);
29
extern int printf(char *template, ...);
30
 
31
int
32
main (int argc, char *argv[])
33
{
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;
43
}

powered by: WebSVN 2.1.0

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