Debian Codegraph @

gcc/testsuite/gfortran.dg/c-interop/typecodes-array-longdouble.f90

raw
1 ! PR 101305
2 ! PR 100917
3 ! { dg-do run }
4 ! { dg-additional-sources "typecodes-array-longdouble-c.c dump-descriptors.c" }
5 ! { dg-additional-options "-g" }
6 !
7 ! This program tests that long double kind constants in the ISO_C_BINDING
8 ! module result in the right type field in arguments passed by descriptor,
9 ! also matching the size of the corresponding C type. We use
10 ! assumed-rank arrays to force the use of a descriptor.
11
12
13 program testit
14 use iso_c_binding
15 implicit none
16
17 interface
18
19 subroutine ctest (arg_long_double, arg_long_double_complex) bind (c)
20 use iso_c_binding
21 real(C_LONG_DOUBLE) :: arg_long_double(:)
22 complex(C_LONG_DOUBLE_COMPLEX) :: arg_long_double_complex(:)
23 end subroutine
24
25 end interface
26
27 real(C_LONG_DOUBLE) :: var_long_double(4)
28 complex(C_LONG_DOUBLE_COMPLEX) :: var_long_double_complex(4)
29
30 call ctest (var_long_double, var_long_double_complex)
31
32 end program