| 1 |
! PR 101305 |
| 2 |
! PR 100914 |
| 3 |
! PR 100917 |
| 4 |
! Fails on x86 targets where sizeof(long double) == 16 (PR100917). |
| 5 |
! { dg-do run } |
| 6 |
! { dg-require-effective-target fortran_real_c_float128 } |
| 7 |
! { dg-additional-sources "typecodes-array-float128-c.c dump-descriptors.c" } |
| 8 |
! { dg-additional-options "-g" } |
| 9 |
! |
| 10 |
! This program tests that the vendor extension kind constants provided by |
| 11 |
! gfortran's ISO_C_BINDING module result in the right type field in |
| 12 |
! arguments passed by descriptor, also matching the size of the corresponding |
| 13 |
! C type. We use assumed-shape arrays to force the use of a descriptor. |
| 14 |
|
| 15 |
program testit |
| 16 |
use iso_c_binding |
| 17 |
implicit none |
| 18 |
|
| 19 |
interface |
| 20 |
|
| 21 |
subroutine ctest (arg_float128, arg_complex128) bind (c) |
| 22 |
use iso_c_binding |
| 23 |
real(C_FLOAT128) :: arg_float128(:) |
| 24 |
complex(C_FLOAT128_COMPLEX) :: arg_complex128(:) |
| 25 |
end subroutine |
| 26 |
|
| 27 |
end interface |
| 28 |
|
| 29 |
real(C_FLOAT128) :: var_float128(4) |
| 30 |
complex(C_FLOAT128_COMPLEX) :: var_complex128(4) |
| 31 |
|
| 32 |
call ctest (var_float128, var_complex128) |
| 33 |
|
| 34 |
end program |