-
- Downloads
Fortran: Use _Float128 rather than __float128 for c_float128 kind.
The GNU Fortran manual documents that the c_float128 kind corresponds to __float128, but in fact the implementation uses float128_type_node, which is _Float128. Both refer to the 128-bit IEEE/ISO encoding, but some targets including aarch64 only define _Float128 and not __float128, and do not provide quadmath.h. This caused errors in some test cases referring to __float128. This patch changes the documentation (including code comments) and test cases to use _Float128 to match the implementation. 2021-09-16 Sandra Loosemore <sandra@codesourcery.com> gcc/fortran/ * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond to _Float128 rather than __float128. * iso-c-binding.def (c_float128): Update comments. * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise. (build_round_expr): Likewise. (gfc_build_intrinsic_lib_fndcecls): Likewise. * trans-types.h (gfc_real16_is_float128): Likewise. gcc/testsuite/ * gfortran.dg/PR100914.c: Do not include quadmath.h. Use _Float128 _Complex instead of __complex128. * gfortran.dg/PR100914.f90: Add -Wno-pedantic to suppress error about use of _Float128. * gfortran.dg/c-interop/typecodes-array-float128-c.c: Use _Float128 instead of __float128. * gfortran.dg/c-interop/typecodes-sanity-c.c: Likewise. * gfortran.dg/c-interop/typecodes-scalar-float128-c.c: Likewise. * lib/target-supports.exp (check_effective_target_fortran_real_c_float128): Update comments. libgfortran/ * ISO_Fortran_binding.h: Update comments. * runtime/ISO_Fortran_binding.c: Likewise.
Showing
- gcc/fortran/intrinsic.texi 4 additions, 4 deletionsgcc/fortran/intrinsic.texi
- gcc/fortran/iso-c-binding.def 1 addition, 1 deletiongcc/fortran/iso-c-binding.def
- gcc/fortran/trans-intrinsic.c 3 additions, 3 deletionsgcc/fortran/trans-intrinsic.c
- gcc/fortran/trans-types.h 1 addition, 1 deletiongcc/fortran/trans-types.h
- gcc/testsuite/gfortran.dg/PR100914.c 2 additions, 3 deletionsgcc/testsuite/gfortran.dg/PR100914.c
- gcc/testsuite/gfortran.dg/PR100914.f90 1 addition, 0 deletionsgcc/testsuite/gfortran.dg/PR100914.f90
- gcc/testsuite/gfortran.dg/c-interop/typecodes-array-float128-c.c 2 additions, 2 deletions...tsuite/gfortran.dg/c-interop/typecodes-array-float128-c.c
- gcc/testsuite/gfortran.dg/c-interop/typecodes-sanity-c.c 3 additions, 4 deletionsgcc/testsuite/gfortran.dg/c-interop/typecodes-sanity-c.c
- gcc/testsuite/gfortran.dg/c-interop/typecodes-scalar-float128-c.c 2 additions, 2 deletions...suite/gfortran.dg/c-interop/typecodes-scalar-float128-c.c
- gcc/testsuite/lib/target-supports.exp 2 additions, 2 deletionsgcc/testsuite/lib/target-supports.exp
- libgfortran/ISO_Fortran_binding.h 2 additions, 2 deletionslibgfortran/ISO_Fortran_binding.h
- libgfortran/runtime/ISO_Fortran_binding.c 1 addition, 1 deletionlibgfortran/runtime/ISO_Fortran_binding.c
Loading
Please register or sign in to comment