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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [testsuite/] [gdb.base/] [ending-run.c] - Blame information for rev 1181

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

Line No. Rev Author Line
1 1181 sfurman
/* Test program for <next-at-end> and
2
 * <leaves-core-file-on-quit> bugs.
3
 */
4
#include <stdio.h>
5
#include <stdlib.h>
6
 
7
#ifdef PROTOTYPES
8
int callee (int x)
9
#else
10
int callee( x )
11
int x;
12
#endif
13
{
14
    int y = x * x;
15
    return (y - 2);
16
}
17
 
18
int main()
19
{
20
 
21
    int *p;
22
    int i;
23
 
24
    p = (int *) malloc( 4 );
25
 
26
    for (i = 1; i < 10; i++)
27
        {
28
            printf( "%d ", callee( i ));
29
            fflush (stdout);
30
        }
31
    printf( " Goodbye!\n" ); fflush (stdout);
32
    return 0;
33
}

powered by: WebSVN 2.1.0

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