Improve code generation of strided SLP loads
[official-gcc.git] / gcc / testsuite / gfortran.dg / ISO_Fortran_binding_3.c
blob33d1bc3c7e3d05e288769d9ec33addd5cca30f9b
1 #include <ISO_Fortran_binding.h>
2 #include <stdio.h>
3 #include <stdlib.h>
5 /* Part of the test for the fix of PR88929 - see ISO_Fortran_binding_3.f90. */
7 int c_test (CFI_cdesc_t * a_desc)
9 CFI_index_t idx[2];
10 int *res_addr;
11 int err = 1; /* this error code represents all errors */
13 if (a_desc->rank != 2)
14 return err;
16 if (a_desc->type != CFI_type_int)
17 return err;
19 err = 0;
20 for (idx[0] = 0; idx[0] < a_desc->dim[0].extent; idx[0]++)
21 for (idx[1] = 0; idx[1] < a_desc->dim[1].extent; idx[1]++)
23 res_addr = CFI_address (a_desc, idx);
24 err += *res_addr;
25 *res_addr = *res_addr + 1;
28 if (err != 10) return 1;
30 return 0;