URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 275 |
Rev 384 |
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int main ()
|
int main ()
|
{
|
{
|
char *foo = (char *) malloc (10);
|
char *foo = (char *) malloc (10);
|
strcpy (foo, "hello");
|
strcpy (foo, "hello");
|
foo = (char *) realloc (foo, 20);
|
foo = (char *) realloc (foo, 20);
|
printf ("%s", foo);
|
printf ("%s", foo);
|
if (strcmp (foo, "hello"))
|
if (strcmp (foo, "hello"))
|
abort ();
|
abort ();
|
free (foo);
|
free (foo);
|
printf (" world\n");
|
printf (" world\n");
|
return 0;
|
return 0;
|
}
|
}
|
/* { dg-output "hello world" } */
|
/* { dg-output "hello world" } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.