Fortran: Fix c_float128 and c_float128_complex definitions.
authorSandra Loosemore <sandra@codesourcery.com>
Tue, 3 Aug 2021 23:21:16 +0000 (16:21 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Wed, 11 Aug 2021 14:36:55 +0000 (07:36 -0700)
commit58340a7cd3670024bafdbbc6ca63a9af841df98a
treea96a3c8677e30e3d5d7a5391f20fdcb9bd94b743
parentcba64d855df581cc26fa487162027138aef4dbe5
Fortran: Fix c_float128 and c_float128_complex definitions.

gfc_float128_type_node is only non-NULL on targets that support a
128-bit type that is not long double.  Use float128_type_node instead
when computing the value of the kind constants c_float128 and
c_float128_complex from the ISO_C_BINDING intrinsic module; this also
ensures it actually corresponds to __float128 (the IEEE encoding) and
not some other 128-bit floating-point type.

2021-08-11  Sandra Loosemore  <sandra@codesourcery.com>

gcc/fortran/
* iso-c-binding.def (c_float128, c_float128_complex): Check
float128_type_node instead of gfc_float128_type_node.
* trans-types.c (gfc_init_kinds, gfc_build_real_type):
Update comments re supported 128-bit floating-point types.
gcc/fortran/iso-c-binding.def
gcc/fortran/trans-types.c