OSDN Git Service

PR testsuite/35406
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / c_ptr_tests_driver.c
1 /* this is the driver for c_ptr_test.f03 */
2
3 typedef struct services
4 {
5    int compId;
6    void *globalServices;
7 }services_t;
8
9 typedef struct comp
10 {
11    void *myServices;
12    void (*setServices)(struct comp *self, services_t *myServices);
13    void *myPort;
14 }comp_t;
15
16 /* prototypes for f90 functions */
17 void sub0(comp_t *self, services_t *myServices);
18
19 int main(int argc, char **argv)
20 {
21    services_t servicesObj;
22    comp_t myComp;
23
24    servicesObj.compId = 17;
25    servicesObj.globalServices = 0; /* NULL; */
26    myComp.myServices = &servicesObj;
27    myComp.setServices = 0; /* NULL; */
28    myComp.myPort = 0; /* NULL; */
29    
30    sub0(&myComp, &servicesObj);
31    
32    return 0;
33 }/* end main() */
34