c++: dependent conversion operator lookup [PR106179]
[official-gcc.git] / gcc / testsuite / gfortran.dg / bind_c_array_params_3_aux.c
blob459418539284d5808a0515799b618d4d2de91838
1 /* Used by bind_c_array_params_3.f90. */
2 /* PR fortran/92284. */
4 #include <assert.h>
5 #include <errno.h>
6 #include <stdio.h>
8 #include <ISO_Fortran_binding.h>
10 void arr_set_c(CFI_cdesc_t*);
12 void arr_set_c(CFI_cdesc_t *arr){
13 int i, stat, *auxp = NULL;
14 CFI_index_t lb[] = {1};
15 CFI_index_t ub[] = {9};
17 assert(arr);
18 assert(arr->rank==1);
19 assert(!arr->base_addr);
20 stat = CFI_allocate(arr, lb, ub, sizeof(int));
21 assert(stat==CFI_SUCCESS);
22 auxp = (int*)arr->base_addr;
23 assert(auxp);
24 for(i=0; i<ub[0]-lb[0]+1; i++) auxp[i]=i;
25 return;