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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.hp/] [gdb.base-hp/] [pxdb.c] - Blame information for rev 1774

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

Line No. Rev Author Line
1 106 markom
#include <stdio.h>
2
 
3
#ifdef PROTOTYPES
4
int callee (int x)
5
#else
6
int callee( x )
7
int x;
8
#endif
9
{
10
    int y = x * x;
11
    return (y - 2);
12
}
13
 
14
int main()
15
{
16
    int i;
17
    for (i = 1; i < 10; i++)
18
        {
19
            printf( "%d ", callee( i ));
20
 
21
        }
22
    printf( " Goodbye!\n" );
23
    return 0;
24
}
25
/* This routine exists only for aCC.  The way we compile this test is
26
   that we use aCC for the actual compile into the object file but then
27
   use ld directly for the link.  When we do this, we get an undefined
28
   symbol _main().  Therefore, for aCC, we have this routine in here and
29
   ld is happy.  */
30
 
31
#ifdef __cplusplus
32
extern "C" {
33
void _main()
34
{
35
}
36
}
37
#endif

powered by: WebSVN 2.1.0

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