1 #include <stdlib.h>
2
3 #include <ISO_Fortran_binding.h>
4 #include "dump-descriptors.h"
5
6 extern void ctest (CFI_cdesc_t *a);
7
8 void
9 ctest (CFI_cdesc_t *a)
10 {
11 /* Dump the descriptor contents to test that we can access the fields
12 correctly, etc. */
13 dump_CFI_cdesc_t (a);
14
15 /* The actual argument on the Fortran side was declared as
16 character(len=20) :: aa
17 Make sure that matches what's in the descriptor. */
18 if (!a->base_addr)
19 abort ();
20 if (a->elem_len != 20)
21 abort ();
22 if (a->rank != 0)
23 abort ();
24 if (a->type != CFI_type_char)
25 abort ();
26 if (a->attribute != CFI_attribute_other)
27 abort ();
28 }