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.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [c_funloc_tests_4_driver.c] - Rev 302
Go to most recent revision | Compare with Previous | Blame | View Log
#include <stdio.h> void sub0(void); void c_sub0(void (*sub)(void)); void c_sub1(int (*func)(int)); extern void abort(void); int main(int argc, char **argv) { printf("hello from C main\n"); sub0(); return 0; } void c_sub0(void (*sub)(void)) { printf("hello from c_sub0\n"); sub(); return; } void c_sub1(int (*func)(int)) { int retval; printf("hello from c_sub1\n"); retval = func(10); if(retval != 10) { fprintf(stderr, "Fortran function did not return expected value!\n"); abort(); } return; }
Go to most recent revision | Compare with Previous | Blame | View Log