https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32187
--- Comment #10 from emsr at gcc dot gnu.org --- Author: emsr Date: Tue Aug 16 14:56:55 2016 New Revision: 239504 URL: https://gcc.gnu.org/viewcvs?rev=239504&root=gcc&view=rev Log: Commit Joseph Myers Implement C _FloatN, _FloatNx types [version 5] to the branch. This is to test impact on my use of __float128 and comlex. gcc: 2016-07-22 Joseph Myers <jos...@codesourcery.com> PR c/32187 * tree-core.h (TI_COMPLEX_FLOAT16_TYPE) (TI_COMPLEX_FLOATN_NX_TYPE_FIRST, TI_COMPLEX_FLOAT32_TYPE) (TI_COMPLEX_FLOAT64_TYPE, TI_COMPLEX_FLOAT128_TYPE) (TI_COMPLEX_FLOAT32X_TYPE, TI_COMPLEX_FLOAT64X_TYPE) (TI_COMPLEX_FLOAT128X_TYPE, TI_FLOAT16_TYPE, TI_FLOATN_TYPE_FIRST) (TI_FLOATN_NX_TYPE_FIRST, TI_FLOAT32_TYPE, TI_FLOAT64_TYPE) (TI_FLOAT128_TYPE, TI_FLOATN_TYPE_LAST, TI_FLOAT32X_TYPE) (TI_FLOATNX_TYPE_FIRST, TI_FLOAT64X_TYPE, TI_FLOAT128X_TYPE) (TI_FLOATNX_TYPE_LAST, TI_FLOATN_NX_TYPE_LAST): New enum tree_index values. (NUM_FLOATN_TYPES, NUM_FLOATNX_TYPES, NUM_FLOATN_NX_TYPES): New macros. (struct floatn_type_info): New structure type. (floatn_nx_types): New variable declaration. * tree.h (FLOATN_TYPE_NODE, FLOATN_NX_TYPE_NODE) (FLOATNX_TYPE_NODE, float128_type_node, float64x_type_node) (COMPLEX_FLOATN_NX_TYPE_NODE): New macros. * tree.c (floatn_nx_types): New variable. (build_common_tree_nodes): Initialize _FloatN, _FloatNx and corresponding complex types. * target.def (floatn_mode): New hook. * targhooks.c: Include "real.h". (default_floatn_mode): New function. * targhooks.h (default_floatn_mode): New prototype. * doc/extend.texi (Floating Types): Document _FloatN and _FloatNx types. * doc/sourcebuild.texi (float@var{n}, float@var{n}x): Document new effective-target keywords. * doc/tm.texi.in (TARGET_FLOATN_MODE): New @hook. * doc/tm.texi: Regenerate. * ginclude/float.h (LDBL_DECIMAL_DIG): Define to __LDBL_DECIMAL_DIG__, not __DECIMAL_DIG__. [__STDC_WANT_IEC_60559_TYPES_EXT__]: Define macros from TS 18661-3. * real.h (struct real_format): Add field ieee_bits. * real.c (ieee_single_format, mips_single_format) (motorola_single_format, spu_single_format, ieee_double_format) (mips_double_format, motorola_double_format) (ieee_extended_motorola_format, ieee_extended_intel_96_format) (ieee_extended_intel_128_format) (ieee_extended_intel_96_round_53_format, ibm_extended_format) (mips_extended_format, ieee_quad_format, mips_quad_format) (vax_f_format, vax_d_format, vax_g_format, decimal_single_format) (decimal_double_format, decimal_quad_format, ieee_half_format) (arm_half_format, real_internal_format: Initialize ieee_bits field. * config/i386/i386.c (ix86_init_builtin_types): Do not initialize float128_type_node. Set float80_type_node to float64x_type_node if appropriate and long_double_type_node not appropriate. * config/ia64/ia64.c (ia64_init_builtins): Likewise. * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Initialize ieee_bits field. * config/rs6000/rs6000.c (TARGET_FLOATN_MODE): New macro. (rs6000_init_builtins): Set ieee128_float_type_node to float128_type_node. (rs6000_floatn_mode): New function. gcc/c: 2016-07-22 Joseph Myers <jos...@codesourcery.com> PR c/32187 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value. (struct c_declspecs): Add field floatn_nx_idx. * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN and _FloatNx type specifiers. * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs) (c_parser_declspecs, c_parser_attribute_any_word) (c_parser_objc_selector): Use CASE_RID_FLOATN_NX. * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types. (convert_arguments): Avoid promoting _FloatN and _FloatNx types narrower than double. gcc/c-family: 2016-07-22 Joseph Myers <jos...@codesourcery.com> PR c/32187 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32) (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X) (RID_FLOAT128X): New enum rid values. (CASE_RID_FLOATN_NX): New macro. * c-common.c (c_common_reswords): Add _FloatN and _FloatNx keywords. (c_common_type_for_mode): Check for _FloatN and _FloatNx and corresponding complex types. (c_common_nodes_and_builtins): For non-C++, register _FloatN and _FloatNx and corresponding complex types. (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX. * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN and _FloatNx types for the widest type for determining DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL. (c_cpp_builtins): Call builtin_define_float_constants for _FloatN and _FloatNx types. * c-lex.c (interpret_float): Handle _FloatN and _FloatNx constants. * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and _FloatNx types. gcc/fortran: 2016-07-22 Joseph Myers <jos...@codesourcery.com> PR c/32187 * trans-types.h (float128_type_node): Rename to gfc_float128_type_node. (complex_float128_type_node): Rename to gfc_complex_float128_type_node. * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users changed. gcc/testsuite: 2016-07-22 Joseph Myers <jos...@codesourcery.com> PR c/32187 * lib/target-supports.exp (check_effective_target_float16) (check_effective_target_float32, check_effective_target_float64) (check_effective_target_float128, check_effective_target_float32x) (check_effective_target_float64x) (check_effective_target_float128x): New procedures. * gcc.dg/dfp/floatn.c, gcc.dg/float128-typeof.c, gcc.dg/float128x-typeof.c, gcc.dg/float16-typeof.c, gcc.dg/float32-typeof.c, gcc.dg/float32x-typeof.c, gcc.dg/float64-typeof.c, gcc.dg/float64x-typeof.c, gcc.dg/floatn-arithconv.c, gcc.dg/floatn-errs.c, gcc.dg/floatn-typeof.h, gcc.dg/torture/float128-basic.c, gcc.dg/torture/float128-complex.c, gcc.dg/torture/float128-floath.c, gcc.dg/torture/float128-tg.c, gcc.dg/torture/float128x-basic.c, gcc.dg/torture/float128x-complex.c, gcc.dg/torture/float128x-floath.c, gcc.dg/torture/float128x-tg.c, gcc.dg/torture/float16-basic.c, gcc.dg/torture/float16-complex.c, gcc.dg/torture/float16-floath.c, gcc.dg/torture/float16-tg.c, gcc.dg/torture/float32-basic.c, gcc.dg/torture/float32-complex.c, gcc.dg/torture/float32-floath.c, gcc.dg/torture/float32-tg.c, gcc.dg/torture/float32x-basic.c, gcc.dg/torture/float32x-complex.c, gcc.dg/torture/float32x-floath.c, gcc.dg/torture/float32x-tg.c, gcc.dg/torture/float64-basic.c, gcc.dg/torture/float64-complex.c, gcc.dg/torture/float64-floath.c, gcc.dg/torture/float64-tg.c, gcc.dg/torture/float64x-basic.c, gcc.dg/torture/float64x-complex.c, gcc.dg/torture/float64x-floath.c, gcc.dg/torture/float64x-tg.c, gcc.dg/torture/floatn-basic.h, gcc.dg/torture/floatn-complex.h, gcc.dg/torture/floatn-convert.c, gcc.dg/torture/floatn-floath.h, gcc.dg/torture/floatn-tg.h, gcc.dg/torture/fp-int-convert-float128-ieee-timode.c, gcc.dg/torture/fp-int-convert-float128-ieee.c, gcc.dg/torture/fp-int-convert-float128x-timode.c, gcc.dg/torture/fp-int-convert-float128x.c, gcc.dg/torture/fp-int-convert-float16-timode.c, gcc.dg/torture/fp-int-convert-float16.c, gcc.dg/torture/fp-int-convert-float32-timode.c, gcc.dg/torture/fp-int-convert-float32.c, gcc.dg/torture/fp-int-convert-float32x-timode.c, gcc.dg/torture/fp-int-convert-float32x.c, gcc.dg/torture/fp-int-convert-float64-timode.c, gcc.dg/torture/fp-int-convert-float64.c, gcc.dg/torture/fp-int-convert-float64x-timode.c, gcc.dg/torture/fp-int-convert-float64x.c: New tests. libcpp: 2016-07-22 Joseph Myers <jos...@codesourcery.com> PR c/32187 * include/cpplib.h (CPP_N_FLOATN, CPP_N_FLOATNX) (CPP_N_WIDTH_FLOATN_NX, CPP_FLOATN_SHIFT, CPP_FLOATN_MAX): New macros. * expr.c (interpret_float_suffix): Handle fN, fNx, FN and FNx suffixes. Added: branches/tr29124/gcc/testsuite/gcc.dg/dfp/floatn.c branches/tr29124/gcc/testsuite/gcc.dg/float128-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/float128x-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/float16-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/float32-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/float32x-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/float64-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/float64x-typeof.c branches/tr29124/gcc/testsuite/gcc.dg/floatn-arithconv.c branches/tr29124/gcc/testsuite/gcc.dg/floatn-errs.c branches/tr29124/gcc/testsuite/gcc.dg/floatn-typeof.h branches/tr29124/gcc/testsuite/gcc.dg/torture/float128-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128x-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128x-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128x-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float128x-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float16-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float16-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float16-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float16-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32x-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32x-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32x-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float32x-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64x-basic.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64x-complex.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64x-floath.c branches/tr29124/gcc/testsuite/gcc.dg/torture/float64x-tg.c branches/tr29124/gcc/testsuite/gcc.dg/torture/floatn-basic.h branches/tr29124/gcc/testsuite/gcc.dg/torture/floatn-complex.h branches/tr29124/gcc/testsuite/gcc.dg/torture/floatn-convert.c branches/tr29124/gcc/testsuite/gcc.dg/torture/floatn-floath.h branches/tr29124/gcc/testsuite/gcc.dg/torture/floatn-tg.h branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-ieee-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-ieee.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128x-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128x.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float16-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float16.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float32-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float32.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float32x-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float32x.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float64-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float64.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float64x-timode.c branches/tr29124/gcc/testsuite/gcc.dg/torture/fp-int-convert-float64x.c Modified: branches/tr29124/gcc/ChangeLog branches/tr29124/gcc/c-family/ChangeLog branches/tr29124/gcc/c-family/c-common.c branches/tr29124/gcc/c-family/c-common.h branches/tr29124/gcc/c-family/c-cppbuiltin.c branches/tr29124/gcc/c-family/c-lex.c branches/tr29124/gcc/c-family/c-pretty-print.c branches/tr29124/gcc/c/ChangeLog branches/tr29124/gcc/c/c-decl.c branches/tr29124/gcc/c/c-parser.c branches/tr29124/gcc/c/c-tree.h branches/tr29124/gcc/c/c-typeck.c branches/tr29124/gcc/config/i386/i386.c branches/tr29124/gcc/config/ia64/ia64.c branches/tr29124/gcc/config/pdp11/pdp11.c branches/tr29124/gcc/config/rs6000/rs6000.c branches/tr29124/gcc/doc/extend.texi branches/tr29124/gcc/doc/sourcebuild.texi branches/tr29124/gcc/doc/tm.texi branches/tr29124/gcc/doc/tm.texi.in branches/tr29124/gcc/fortran/ChangeLog branches/tr29124/gcc/fortran/iso-c-binding.def branches/tr29124/gcc/fortran/trans-intrinsic.c branches/tr29124/gcc/fortran/trans-types.c branches/tr29124/gcc/fortran/trans-types.h branches/tr29124/gcc/ginclude/float.h branches/tr29124/gcc/real.c branches/tr29124/gcc/real.h branches/tr29124/gcc/target.def branches/tr29124/gcc/targhooks.c branches/tr29124/gcc/targhooks.h branches/tr29124/gcc/testsuite/ChangeLog branches/tr29124/gcc/testsuite/lib/target-supports.exp branches/tr29124/gcc/tree-core.h branches/tr29124/gcc/tree.c branches/tr29124/gcc/tree.h branches/tr29124/libcpp/ChangeLog branches/tr29124/libcpp/expr.c branches/tr29124/libcpp/include/cpplib.h