blob: a52122f930f89fc7cc00e359394bf1d3483d8b17 [file] [log] [blame]
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <ISO_Fortran_binding.h>
#include "dump-descriptors.h"
extern void ctest (CFI_cdesc_t *arg_long_double,
CFI_cdesc_t *arg_long_double_complex);
/* Sanity check the type info in the descriptor a. */
static void
check (CFI_cdesc_t *a, size_t size, int typecode)
{
dump_CFI_cdesc_t (a);
if (a->attribute != CFI_attribute_pointer)
abort ();
if (a->base_addr != NULL)
abort ();
if (a->rank != 0)
abort ();
if (size && a->elem_len != size)
abort ();
if (a->type != typecode)
abort ();
}
void
ctest (CFI_cdesc_t *arg_long_double,
CFI_cdesc_t *arg_long_double_complex)
{
check (arg_long_double, sizeof (long double), CFI_type_long_double);
check (arg_long_double_complex, sizeof (long double _Complex),
CFI_type_long_double_Complex);
}