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.tree] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// -*- c -*- c mode in emacs
2
 
3
//  Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4
//  This program is free software; you can redistribute it and/or modify it
5
//  under the terms of the GNU General Public License as published by the
6
//  Free Software Foundation; either version 2, or (at your option) any
7
//  later version.
8
//
9
//  This program is distributed in the hope that it will be useful,
10
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
//  GNU General Public License for more details.
13
//
14
//  You should have received a copy of the GNU General Public License
15
//  along with this program; if not, write to the Free Software
16
//  Foundation, 51 Franklin Street, Fifth Floor,
17
//  Boston, MA 02110-1301, USA.
18
//
19
//  In other words, you are welcome to use, share and improve this program.
20
//  You are forbidden to forbid anyone else to use, share and improve
21
//  what you give them.   Help stamp out software-hoarding!
22
 
23
 
24
external_definition int add(int arg1, int arg2);
25
external_definition int subtract(int arg3, int arg4);
26
external_definition int first_nonzero(int arg5, int arg6);
27
external_definition int double_plus_one(int arg7);
28
 
29
add
30
{
31
  return arg1 + arg2;
32
}
33
 
34
 
35
subtract
36
{
37
  return arg3 - arg4;
38
}
39
 
40
double_plus_one
41
{
42
  automatic int aaa;
43
  aaa=add(arg7, arg7);
44
  aaa=add(aaa, aaa);
45
  aaa=subtract(subtract(aaa, arg7), arg7) + 1;
46
  return aaa;
47
}
48
 
49
first_nonzero
50
{
51
  if (arg5)
52
    {
53
      return arg5;
54
    }
55
  else
56
    {
57
    }
58
  return arg6;
59
}
60
 

powered by: WebSVN 2.1.0

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