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] - Blame information for rev 801

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

Line No. Rev Author Line
1 694 jeremybenn
/* This file provides auxilliary functions for c_ptr_tests_8.  */
2
 
3
#include <stdio.h>
4
#include <stdlib.h>
5
 
6
extern void abort (void);
7
 
8
void *create (void)
9
{
10
  int *a;
11
  a = malloc (sizeof (a));
12
  *a = 444;
13
  return a;
14
 
15
}
16
 
17
void show (int *a)
18
{
19
  if (*a == 444)
20
    printf ("SUCCESS (%d)\n", *a);
21
  else
22
  {
23
    printf ("FAILED: Expected 444, received %d\n", *a);
24
    abort ();
25
  }
26
}

powered by: WebSVN 2.1.0

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