OSDN Git Service

2010-02-22 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / lto / 20100222-1_1.c
1 /* 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 }