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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_ptr_tests_8_funcs.c] - Rev 801

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

/* This file provides auxilliary functions for c_ptr_tests_8.  */
 
#include <stdio.h>
#include <stdlib.h>
 
extern void abort (void);
 
void *create (void)
{
  int *a;
  a = malloc (sizeof (a));
  *a = 444;
  return a;
 
}
 
void show (int *a)
{
  if (*a == 444)
    printf ("SUCCESS (%d)\n", *a);
  else
  {
    printf ("FAILED: Expected 444, received %d\n", *a);
    abort ();
  }
}
 

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

powered by: WebSVN 2.1.0

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