RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / ISO_Fortran_binding_17.c
blobfa75268cd26c8a1e0e7434ab784fcddc5170587d
1 /* PR fortran/92470 - to be used with ISO_Fortran_binding_17.f90 */
3 #include <stdio.h>
4 #include <assert.h>
5 #include <ISO_Fortran_binding.h>
7 void Csub(const CFI_cdesc_t *, size_t, CFI_index_t invalid);
9 void Csub(const CFI_cdesc_t * dv, size_t locd, CFI_index_t invalid) {
11 CFI_index_t lb[1];
12 lb[0] = dv->dim[0].lower_bound;
13 size_t ld = (size_t)CFI_address(dv, lb);
15 if (ld != locd)
16 printf ("In C function: CFI_address of dv = %I64x\n", ld);
17 assert( ld == locd );
19 lb[0] = invalid;
20 /* Shall return NULL and produce stderr diagnostic with -fcheck=array. */
21 ld = (size_t)CFI_address(dv, lb);
22 assert (ld == 0);
24 return;