| 1 |
/* Test the fix for PR90093. */ |
| 2 |
|
| 3 |
#include <stdio.h> |
| 4 |
#include <math.h> |
| 5 |
#include <ISO_Fortran_binding.h> |
| 6 |
|
| 7 |
/* Contributed by Reinhold Bader <[email protected]> */ |
| 8 |
|
| 9 |
void foo_opt(CFI_cdesc_t *, float *, int *, int); |
| 10 |
void write_res(); |
| 11 |
|
| 12 |
float x[34]; |
| 13 |
|
| 14 |
int main() { |
| 15 |
CFI_CDESC_T(1) xd; |
| 16 |
CFI_index_t ext[] = {34}; |
| 17 |
int sz; |
| 18 |
|
| 19 |
CFI_establish((CFI_cdesc_t *) &xd, &x, CFI_attribute_other, |
| 20 |
CFI_type_float, 0, 1, ext); |
| 21 |
|
| 22 |
foo_opt((CFI_cdesc_t *) &xd, NULL, NULL, 0); |
| 23 |
sz = 12; |
| 24 |
foo_opt(NULL, &x[11], &sz, 1); |
| 25 |
|
| 26 |
write_res(); |
| 27 |
|
| 28 |
return 0; |
| 29 |
} |