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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_funloc_tests_3_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
/* These functions support the test case c_funloc_tests_3.  */
2
#include <stdlib.h>
3
#include <stdio.h>
4
 
5
int printIntC(int i)
6
{
7
  return 3*i;
8
}
9
 
10
int (*returnFunc(void))(int)
11
{
12
  return &printIntC;
13
}
14
 
15
void callFunc(int(*func)(int), int pass, int compare)
16
{
17
  int result = (*func)(pass);
18
  if(result != compare)
19
    {
20
       printf("FAILED: Got %d, expected %d\n", result, compare);
21
       abort();
22
    }
23
  else
24
    printf("SUCCESS: Got %d, expected %d\n", result, compare);
25
}

powered by: WebSVN 2.1.0

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