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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [libmudflap/] [testsuite/] [libmudflap.c/] [hook-allocstuff.c] - Diff between revs 275 and 384

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" } */
 
 

powered by: WebSVN 2.1.0

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