OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [gdb/] [testsuite/] [gdb.hp/] [gdb.base-hp/] [pxdb.c] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
#include <stdio.h>
#include <stdio.h>
 
 
#ifdef PROTOTYPES
#ifdef PROTOTYPES
int callee (int x)
int callee (int x)
#else
#else
int callee( x )
int callee( x )
int x;
int x;
#endif
#endif
{
{
    int y = x * x;
    int y = x * x;
    return (y - 2);
    return (y - 2);
}
}
 
 
int main()
int main()
{
{
    int i;
    int i;
    for (i = 1; i < 10; i++)
    for (i = 1; i < 10; i++)
        {
        {
            printf( "%d ", callee( i ));
            printf( "%d ", callee( i ));
 
 
        }
        }
    printf( " Goodbye!\n" );
    printf( " Goodbye!\n" );
    return 0;
    return 0;
}
}
/* This routine exists only for aCC.  The way we compile this test is
/* This routine exists only for aCC.  The way we compile this test is
   that we use aCC for the actual compile into the object file but then
   that we use aCC for the actual compile into the object file but then
   use ld directly for the link.  When we do this, we get an undefined
   use ld directly for the link.  When we do this, we get an undefined
   symbol _main().  Therefore, for aCC, we have this routine in here and
   symbol _main().  Therefore, for aCC, we have this routine in here and
   ld is happy.  */
   ld is happy.  */
 
 
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
extern "C" {
void _main()
void _main()
{
{
}
}
}
}
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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