aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
AgeCommit message (Collapse)AuthorFilesLines
2019-08-23re PR middle-end/91283 (gcc.dg/torture/c99-contract-1.c FAILs)Jakub Jelinek2-2/+8
PR middle-end/91283 * common.opt (fexcess-precision=): Add Optimization flag. Use flag_excess_precision variable instead of flag_excess_precision_cmdline. * flags.h (class target_flag_state): Remove x_flag_excess_precision member. (flag_excess_precision): Don't define. * langhooks.c (lhd_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. Remove comment. * opts.c (set_fast_math_flags): Use frontend_set_flag_excess_precision and x_flag_excess_precision instead of frontend_set_flag_excess_precision_cmdline and x_flag_excess_precision_cmdline. (fast_math_flags_set_p): Use x_flag_excess_precision instead of x_flag_excess_precision_cmdline. * toplev.c (init_excess_precision): Remove. (lang_dependent_init_target): Don't call it. ada/ * gcc-interface/misc.c (gnat_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. brig/ * brig-lang.c (brig_langhook_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. c-family/ * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision instead of flag_excess_precision_cmdline. * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise. * c-opts.c (c_common_post_options): Likewise. d/ * d-lang.cc (d_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. fortran/ * options.c (gfc_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. Remove comment. go/ * go-lang.c (go_langhook_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. lto/ * lto-lang.c (lto_post_options): Set flag_excess_precision instead of flag_excess_precision_cmdline. Remove comment. From-SVN: r274850
2019-08-21re PR d/91339 (libphobos: ftbfs when the path contains '~')Iain Buclaw2-2/+3
PR d/91339 d/dmd: Merge upstream dmd b37a537d3 Fixes the error: cannot find source code for runtime library file 'object.d' when the path contains '~'. Reviewed-on: https://github.com/dlang/dmd/pull/10309 From-SVN: r274771
2019-08-21d: Partially fix ICE: in register_moduleinfo, at d/modules.cc:40Iain Buclaw2-1/+10
gcc/d/ChangeLog: PR d/88722 * modules.cc: Include diagnostic.h. (register_moduleinfo): Use sorry instead of gcc_assert for targets without named sections. From-SVN: r274769
2019-08-21d/dmd: Merge upstream dmd 375ed10aaIain Buclaw5-13/+30
Don't crash when compiling for 16-bit platforms. Reviewed-on: https://github.com/dlang/dmd/pull/10306 gcc/d/ChangeLog: * d-target.cc: Include diagnostic.h. (Target::_init): Set Tsize_t and Tptrdiff_t as D ushort and short if the target pointer size is 2. Add sorry if the pointer size is not either 2, 4, or 8. From-SVN: r274768
2019-08-21d: Fix ICE: Segmentation fault in build_function_type at gcc/tree.c:8539Iain Buclaw2-0/+28
gcc/d/ChangeLog: PR d/90446 * d-lang.cc (d_type_for_mode): Check for all internal __intN types. (d_type_for_size): Likewise. From-SVN: r274767
2019-08-21d: Fix internal compiler error: in d_build_c_type_nodes, at d/d-builtins.cc:783Iain Buclaw2-6/+11
gcc/d/ChangeLog: PR d/90445 * d-builtins.cc (d_build_c_type_nodes): Test UINTMAX_TYPE for setting uintmax_type_node. Set signed_size_type_node as the signed_type_for size_type_node. From-SVN: r274766
2019-08-21d: Fix internal compiler error: in d_init_builtins, at d/d-builtins.cc:1121Iain Buclaw2-36/+70
gcc/d/ChangeLog: PR d/90444 * d-builtins.cc (build_frontend_type): Build anonymous RECORD_TYPE nodes as well, push all fields to the struct members. (d_build_builtins_module): Push anonymous va_list structs to the builtins module, naming them __builtin_va_list. (d_init_builtins): Use sorry instead of gcc_unreachable if va_list did not succeed in being represented as a D type. From-SVN: r274765
2019-08-13Use checking forms of DECL_FUNCTION_CODE (PR 91421)Richard Sandiford2-4/+6
We were shoe-horning all built-in enumerations (including frontend and target-specific ones) into a field of type built_in_function. This was accessed as either an lvalue or an rvalue using DECL_FUNCTION_CODE. The obvious danger with this (as was noted by several ??? comments) is that the ranges have nothing to do with each other, and targets can easily have more built-in functions than generic code. But my patch to make the field bigger was the straw that finally made the problem visible. This patch therefore: - replaces the field with a plain unsigned int - turns DECL_FUNCTION_CODE into an rvalue-only accessor that checks that the function really is BUILT_IN_NORMAL - adds corresponding DECL_MD_FUNCTION_CODE and DECL_FE_FUNCTION_CODE accessors for BUILT_IN_MD and BUILT_IN_FRONTEND respectively - adds DECL_UNCHECKED_FUNCTION_CODE for places that need to access the underlying field (should be low-level code only) - adds new helpers for setting the built-in class and function code - makes DECL_BUILT_IN_CLASS an rvalue-only accessor too, since all assignments should go through the new helpers 2019-08-13 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR middle-end/91421 * tree-core.h (function_decl::function_code): Change type to unsigned int. * tree.h (DECL_FUNCTION_CODE): Rename old definition to... (DECL_UNCHECKED_FUNCTION_CODE): ...this. (DECL_BUILT_IN_CLASS): Make an rvalue macro only. (DECL_FUNCTION_CODE): New function. Assert that the built-in class is BUILT_IN_NORMAL. (DECL_MD_FUNCTION_CODE, DECL_FE_FUNCTION_CODE): New functions. (set_decl_built_in_function, copy_decl_built_in_function): Likewise. (fndecl_built_in_p): Change the type of the "name" argument to unsigned int. * builtins.c (expand_builtin): Move DECL_FUNCTION_CODE use after check for DECL_BUILT_IN_CLASS. * cgraphclones.c (build_function_decl_skip_args): Use set_decl_built_in_function. * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise. * ipa-split.c (split_function): Likewise. * langhooks.c (add_builtin_function_common): Likewise. * omp-simd-clone.c (simd_clone_create): Likewise. * tree-streamer-in.c (unpack_ts_function_decl_value_fields): Likewise. * config/darwin.c (darwin_init_cfstring_builtins): Likewise. (darwin_fold_builtin): Use DECL_MD_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * fold-const.c (operand_equal_p): Compare DECL_UNCHECKED_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * lto-streamer-out.c (hash_tree): Use DECL_UNCHECKED_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * tree-streamer-out.c (pack_ts_function_decl_value_fields): Likewise. * print-tree.c (print_node): Use DECL_MD_FUNCTION_CODE when printing DECL_BUILT_IN_MD. Handle DECL_BUILT_IN_FRONTEND. * config/aarch64/aarch64-builtins.c (aarch64_expand_builtin) (aarch64_fold_builtin, aarch64_gimple_fold_builtin): Use DECL_MD_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * config/aarch64/aarch64.c (aarch64_builtin_reciprocal): Likewise. * config/alpha/alpha.c (alpha_expand_builtin, alpha_fold_builtin): (alpha_gimple_fold_builtin): Likewise. * config/arc/arc.c (arc_expand_builtin): Likewise. * config/arm/arm-builtins.c (arm_expand_builtin): Likewise. * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise. * config/avr/avr.c (avr_expand_builtin, avr_fold_builtin): Likewise. * config/bfin/bfin.c (bfin_expand_builtin): Likewise. * config/c6x/c6x.c (c6x_expand_builtin): Likewise. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/gcn/gcn.c (gcn_expand_builtin_1): Likewise. (gcn_expand_builtin): Likewise. * config/i386/i386-builtins.c (ix86_builtin_reciprocal): Likewise. (fold_builtin_cpu): Likewise. * config/i386/i386-expand.c (ix86_expand_builtin): Likewise. * config/i386/i386.c (ix86_fold_builtin): Likewise. (ix86_gimple_fold_builtin): Likewise. * config/ia64/ia64.c (ia64_fold_builtin): Likewise. (ia64_expand_builtin): Likewise. * config/iq2000/iq2000.c (iq2000_expand_builtin): Likewise. * config/mips/mips.c (mips_expand_builtin): Likewise. * config/msp430/msp430.c (msp430_expand_builtin): Likewise. * config/nds32/nds32-intrinsic.c (nds32_expand_builtin_impl): Likewise. * config/nios2/nios2.c (nios2_expand_builtin): Likewise. * config/nvptx/nvptx.c (nvptx_expand_builtin): Likewise. * config/pa/pa.c (pa_expand_builtin): Likewise. * config/pru/pru.c (pru_expand_builtin): Likewise. * config/riscv/riscv-builtins.c (riscv_expand_builtin): Likewise. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Likewise. * config/rs6000/rs6000-call.c (htm_expand_builtin): Likewise. (altivec_expand_dst_builtin, altivec_expand_builtin): Likewise. (rs6000_gimple_fold_builtin, rs6000_expand_builtin): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_md_vectorized_function) (rs6000_builtin_reciprocal): Likewise. * config/rx/rx.c (rx_expand_builtin): Likewise. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sh/sh.c (sh_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_expand_builtin): Likewise. (sparc_fold_builtin): Likewise. * config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise. * config/spu/spu.c (spu_expand_builtin): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin): Likewise. * config/tilegx/tilegx.c (tilegx_expand_builtin): Likewise. * config/tilepro/tilepro.c (tilepro_expand_builtin): Likewise. * config/xtensa/xtensa.c (xtensa_fold_builtin): Likewise. (xtensa_expand_builtin): Likewise. gcc/ada/ PR middle-end/91421 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function. (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE. gcc/c/ PR middle-end/91421 * c-decl.c (merge_decls): Use copy_decl_built_in_function. gcc/c-family/ PR middle-end/91421 * c-common.c (resolve_overloaded_builtin): Use copy_decl_built_in_function. gcc/cp/ PR middle-end/91421 * decl.c (duplicate_decls): Use copy_decl_built_in_function. * pt.c (declare_integer_pack): Use set_decl_built_in_function. gcc/d/ PR middle-end/91421 * intrinsics.cc (maybe_set_intrinsic): Use set_decl_built_in_function. gcc/jit/ PR middle-end/91421 * jit-playback.c (new_function): Use set_decl_built_in_function. gcc/lto/ PR middle-end/91421 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * lto-symtab.c (lto_symtab_merge_p): Likewise. From-SVN: r274404
2019-08-11d: Fix ICE: gimplification failed (gimplify.c at 13436)Iain Buclaw2-1/+6
The expression that caused the ICE ++(a += 1.0); The D front-end rewrites and applies implicit type conversions so the expression gets simplified as (int)((double) a += 1.0) += 1 The codegen pass would subsequently generate the following invalid code (int)(double) a = (int)((double) a + 1.0) + 1 The LHS expression `(int)(double) a', represented as a FIX_TRUNC_EXPR being what trips as it is not a valid lvalue for assignment. While LHS casts are stripped away, convert_expr adds a double cast because it converts the expression to its original type before converting it to its target type. There is no valid reason why this is done, so it has been removed. gcc/d/ChangeLog: PR d/90601 * d-convert.cc (convert_expr): Don't convert an expression to its original front-end type before converting to its target type. gcc/testsuite/ChangeLog: PR d/90601 * gdc.dg/pr90601.d: New test. From-SVN: r274263
2019-08-10d: Fix internal compiler error: in add_expr, at tree.c:7794Iain Buclaw2-3/+11
gcc/d/ChangeLog: PR d/91238 * d-codegen.cc (build_address): If taking the address of a CALL_EXPR, wrap it in a TARGET_EXPR. gcc/testsuite/ChangeLog: PR d/91238 * gdc.dg/pr91238.d: New test. From-SVN: r274253
2019-08-10Assorted ChangeLog cleanups.Jakub Jelinek1-12/+12
From-SVN: r274250
2019-08-10Fix ODR violation in d/runtime.ccIain Buclaw2-4/+12
gcc/d/ChangeLog: PR d/90893 * runtime.cc (enum libcall_type): Rename to... (enum d_libcall_type): ...this. (get_libcall_type): Use d_libcall_type. (build_libcall_decl): Likewise. From-SVN: r274249
2019-06-16re PR d/90603 (ICE in functionParameters, at d/dmd/expression.c:1553)Iain Buclaw16-49/+94
PR d/90603 d/dmd: Merge upstream dmd 792f0fdf2 Fixes segmentation fault in functionParameters, and other related semantic bugs in forward or recursively referenced declarations. Reviewed-on: https://github.com/dlang/dmd/pull/10046 From-SVN: r272366
2019-06-16re PR d/90863 (ICE in StatementSemanticVisitor::visit, at ↵Iain Buclaw3-3/+5
d/dmd/statementsem.c:1992) PR d/90863 d/dmd: Merge upstream dmd 6e44734cc Fixes segmentation fault in StatementSemanticVisitor::visit. Reviewed-on: https://github.com/dlang/dmd/pull/10033 From-SVN: r272352
2019-06-16re PR d/90559 (Out of memory because of negative length)Iain Buclaw7-47/+50
PR d/90559 d/dmd: Merge upstream dmd 7afcc60c3 Partially fixes out of memory because of negative length. Reviewed-on: https://github.com/dlang/dmd/pull/10025 gcc/d/ChangeLog: 2019-06-16 Iain Buclaw <ibuclaw@gdcproject.org> PR d/90559 * d-target.cc (Target::_init): Reduce max static data size to INT_MAX. From-SVN: r272351
2019-06-16d/dmd: Merge upstream dmd f8e38c001Iain Buclaw2-6/+40
Fixes bug where foreach(int) doesn't work on BigEndian targets by deprecating the use of index types smaller than a size_t/ptrdiff_t. Reviewed-on: https://github.com/dlang/dmd/pull/10009 From-SVN: r272350
2019-06-16d/dmd: Merge upstream dmd 974650488Iain Buclaw3-1/+7
Adds static function VarDeclaration::create to the dmd C++ interface. Reviewed-on: https://github.com/dlang/dmd/pull/10008 From-SVN: r272349
2019-06-16re PR d/90560 (ICE in visit, at d/dmd/dcast.c:1872)Iain Buclaw2-3/+2
PR d/90560 d/dmd: Merge upstream dmd c6887d9bb Fixes segmentation fault in castTo::CastTo::visit. Reviewed-on: https://github.com/dlang/dmd/pull/10007 From-SVN: r272348
2019-06-16re PR d/90762 (ICE in resolvePropertiesX, at d/dmd/expression.c:251)Iain Buclaw2-6/+12
PR d/90762 d/dmd: Merge upstream dmd b0cd59177 Fixes segmentation fault in resolvePropertiesX. Reviewed-on: https://github.com/dlang/dmd/pull/10006 From-SVN: r272347
2019-06-16re PR d/90761 (ICE in visit, at d/dmd/dcast.c:883)Iain Buclaw2-1/+19
PR d/90761 d/dmd: Merge upstream dmd d912f4e49 Fixes segmentation fault in implicitConvTo::ImplicitConvTo::visit. Reviewed-on: https://github.com/dlang/dmd/pull/10005 From-SVN: r272346
2019-06-16re PR d/90651 (ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524)Iain Buclaw6-35/+103
PR d/90651 d/dmd: Merge upstream dmd 0f6cbbcad Fixes segmentation fault in FuncDeclaration::semantic3. Reviewed-on: https://github.com/dlang/dmd/pull/10003 gcc/d/ChangeLog: 2019-06-16 Iain Buclaw <ibuclaw@gdcproject.org> * typeinfo.cc (object_module): New variable. (make_frontend_typeinfo): Update signature. Set temporary on generated TypeInfo classes. (create_tinfo_types): Set object_module. Move generation of front-end typeinfo into ... (create_frontend_tinfo_types): ... New function. (layout_typeinfo): Call create_frontend_tinfo_types. (layout_classinfo): Likewise. (layout_cpp_typeinfo): Likewise. (create_typeinfo): Likewise. From-SVN: r272345
2019-06-16re PR d/90650 (ICE in fold_convert_loc, at fold-const.c:2552)Iain Buclaw4-1/+21
PR d/90650 d/dmd: Merge upstream dmd ab03e2918 Fixes internal compiler error in fold_convert_loc. Reviewed-on: https://github.com/dlang/dmd/pull/9996 gcc/testsuite/ChangeLog: 2019-06-16 Iain Buclaw <ibuclaw@gdcproject.org> PR d/90650 * gdc.dg/pr90650a.d: New test. * gdc.dg/pr90650b.d: New test. From-SVN: r272344
2019-06-16re PR d/90604 (ICE in sizemask, at d/dmd/mtype.c:2542)Iain Buclaw2-4/+4
PR d/90604 d/dmd: Merge upstream dmd f30c5dc79 Fixes internal compiler error in Type::sizemask. Reviewed-on: https://github.com/dlang/dmd/pull/9998 From-SVN: r272343
2019-06-16re PR d/90602 (ICE: null field)Iain Buclaw2-4/+11
PR d/90602 d/dmd: Merge upstream dmd 420cce2a6 Fixes internal compiler error during CTFE. Reviewed-on: https://github.com/dlang/dmd/pull/9997 From-SVN: r272342
2019-06-16re PR d/90661 (ICE in AlignDeclaration::syntaxCopy, at d/dmd/attrib.c:670)Iain Buclaw2-2/+3
PR d/90661 d/dmd: Merge upstream dmd c74e624c9 Fixes segmentation fault in AlignDeclaration::syntaxCopy. Reviewed-on: https://github.com/dlang/dmd/pull/10001 From-SVN: r272341
2019-06-16re PR d/90651 (ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524)Iain Buclaw2-2/+3
PR d/90651 d/dmd: Merge upstream dmd 78dc31152 Fixes bug where the object module was not always implicitly imported. Reviewed-on: https://github.com/dlang/dmd/pull/9999 From-SVN: r272340
2019-06-16re PR d/90660 (ICE in TypeQualified::resolveHelper, at d/dmd/mtype.c:6738)Iain Buclaw2-1/+5
PR d/90660 d/dmd: Merge upstream dmd bbc5ea66a Fixes segmentation fault in TypeQualified::resolveHelper. Reviewed-on: https://github.com/dlang/dmd/pull/10000 From-SVN: r272339
2019-06-11toir.cc (pop_label): Only queue labels in a vector.Richard Biener2-7/+30
2019-06-11 Richard Biener <rguenthe@suse.de> d/90778 * toir.cc (pop_label): Only queue labels in a vector. (cmp_labels): Label decl comparator. (pop_binding_level): Pop labels in DECL_UID order to avoid debug info differences. From-SVN: r272146
2019-05-28[PATCH] Commonize anon-name generationNathan Sidwell2-7/+7
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg01699.html * tree.h (IDENTIFIER_ANON_P): New. (anon_aggrname_format, anon_aggname_p): Don't declare. (make_anon_name): Declare. * lto-streamer-out.c (DFS::DFS_write_tree_body): Use IDENTIFIER_ANON_P. (hash_tree): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree): Likewise. * tree.c (anon_aggrname_p, anon_aggrname_format): Delete. (anon_cnt, make_anon_name): New. gcc/cp/ * cp-tree.h (make_anon_name): Drop declaration. (TYPE_UNNAMED_P): Use IDENTIFIER_ANON_P. * cp-lang.c (cxx_dwarf_name): Likewise. * class.c (find_flexarrays): Likewise. * decl.c (name_unnamed_type, xref_tag_1): Likewise. * error.c (dump_aggr_type): Likewise. * pt.c (push_template_decl_real): Likewise. * name-lookup.c (consider_binding_level): Likewise. (anon_cnt, make_anon_name): Delete. gcc/d/ * types.cc (fixup_anonymous_offset): Use IDENTIFIER_ANON_P. (layout_aggregate_members): Use make_anon_name. From-SVN: r271702
2019-05-17trans.c (check_inlining_for_nested_subprog): Quote reserved names.Martin Sebor10-21/+38
gcc/ada/ChangeLog: * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote reserved names. gcc/brig/ChangeLog: * brigfrontend/brig-control-handler.cc (brig_directive_control_handler::operator): Remove trailing newline from a diagnostic. * brigfrontend/brig-module-handler.cc (brig_directive_module_handler::operator): Remove a duplicated space from a diagnostic. gcc/c/ChangeLog: * c-decl.c (start_decl): Quote keywords, operators, and types in diagnostics. (finish_decl): Same. * c-parser.c (c_parser_asm_statement): Same. (c_parser_conditional_expression): Same. (c_parser_transaction_cancel): Same. * c-typeck.c (c_common_type): Same. (build_conditional_expr): Same. (digest_init): Same. (process_init_element): Same. (build_binary_op): Same. gcc/c-family/ChangeLog: * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers, keywords, operators, and types in diagnostics. (handle_scalar_storage_order_attribute): Same. (handle_mode_attribute): Same. (handle_visibility_attribute): Same. (handle_assume_aligned_attribute): Same. (handle_no_split_stack_attribute): Same. * c-common.c (shorten_compare): Same. (c_common_truthvalue_conversion): Same. (cb_get_source_date_epoch): Same. * c-lex.c (cb_def_pragma): Quote keywords, operators, and types in diagnostics. (interpret_float): Same. * c-omp.c (c_finish_omp_for): Same. * c-opts.c (c_common_post_options): Same. * c-pch.c (c_common_pch_pragma): Same. * c-pragma.c (pop_alignment): Same. (handle_pragma_pack): Same. (apply_pragma_weak): Same. (handle_pragma_weak): Same. (handle_pragma_scalar_storage_order): Same. (handle_pragma_redefine_extname): Same. (add_to_renaming_pragma_list): Same. (maybe_apply_renaming_pragma): Same. (push_visibility): Same. (handle_pragma_visibility): Same. (handle_pragma_optimize): Same. (handle_pragma_message): Same. * c-warn.c (warn_for_omitted_condop): Same. (lvalue_error): Same. gcc/cp/ChangeLog: * call.c (print_z_candidate): Wrap diagnostic text in a gettext macro. Adjust. (print_z_candidates): Same. (build_conditional_expr_1): Quote keywords, operators, and types in diagnostics. (build_op_delete_call): Same. (maybe_print_user_conv_context): Wrap diagnostic text in a gettext macro. (convert_like_real): Same. (convert_arg_to_ellipsis): Quote keywords, operators, and types in diagnostics. (build_over_call): Same. (joust): Break up an overlong line. Wrap diagnostic text in a gettext macro. * constexpr.c (cxx_eval_check_shift_p): Spell out >= in English. (cxx_eval_constant_expression): Quote keywords, operators, and types in diagnostics. (potential_constant_expression_1): Same. * cp-gimplify.c (cp_genericize_r): Same. * cvt.c (maybe_warn_nodiscard): Quote keywords, operators, and types in diagnostics. (type_promotes_to): Same. * decl.c (check_previous_goto_1): Same. (check_goto): Same. (start_decl): Same. (cp_finish_decl): Avoid parenthesizing a sentence for consistency. (grok_op_properties): Quote keywords, operators, and types in diagnostics. * decl2.c (grokfield): Same. (coerce_delete_type): Same. * except.c (is_admissible_throw_operand_or_catch_parameter): Same. * friend.c (do_friend): Quote C++ tokens. * init.c (build_new_1): Quote keywords, operators, and types in diagnostics. (build_vec_delete_1): Same. (build_delete): Same. * lex.c (parse_strconst_pragma): Same. (handle_pragma_implementation): Same. (unqualified_fn_lookup_error): Same. * mangle.c (write_type): Same. * method.c (defaulted_late_check): Avoid two consecutive punctuators. * name-lookup.c (cp_binding_level_debug): Remove a trailing newline. (pop_everything): Same. * parser.c (cp_lexer_start_debugging): Quote a macro name. in a diagnostic (cp_lexer_stop_debugging): Same. (cp_parser_userdef_numeric_literal): Quote a C++ header name in a diagnostic. (cp_parser_nested_name_specifier_opt): Quote keywords, operators, and types in diagnostics. (cp_parser_question_colon_clause): Same. (cp_parser_asm_definition): Same. (cp_parser_init_declarator): Same. (cp_parser_template_declaration_after_parameters): Avoid capitalizing a sentence in a diagnostic. (cp_parser_omp_declare_reduction): Quote keywords, operators, and types in diagnostics. (cp_parser_transaction): Same. * pt.c (maybe_process_partial_specialization): Replace second call to permerror with inform for consistency with other uses. (expand_integer_pack): Quote keywords, operators, and types in diagnostics. * rtti.c (get_typeid): Quote keywords, operators, and types in diagnostics. (build_dynamic_cast_1): Same. * semantics.c (finish_asm_stmt): Same. (finish_label_decl): Same. (finish_bases): Same. (finish_offsetof): Same. (cp_check_omp_declare_reduction): Same. (finish_decltype_type): Same. * tree.c (handle_init_priority_attribute): Same. Add detail to diagnostics. (maybe_warn_zero_as_null_pointer_constant): Same. * typeck.c (cp_build_binary_op): Quote keywords, operators, and types in diagnostics. (cp_build_unary_op): Same. (check_for_casting_away_constness): Same. (build_static_cast): Same. (build_const_cast_1): Same. (maybe_warn_about_returning_address_of_local): Same. (check_return_expr): Same. * typeck2.c (abstract_virtuals_error_sfinae): Same. (digest_init_r): Replace a tab with spaces in a diagnostic. (build_functional_cast): Quote keywords, operators, and types in diagnostics. gcc/d/ChangeLog: * d-builtins.cc (d_init_builtins): Quote keywords, operators, and types in diagnostics. * d-codegen.cc (get_array_length): Same. Replace can't with cannot. * d-convert.cc (convert_expr): Same. * d-frontend.cc (getTypeInfoType): Quote an option name in a diagnostic. * d-lang.cc (d_handle_option): Same. (d_parse_file): Same. * decl.cc: Remove a trailing period from a diagnostic. * expr.cc: Use a directive for an apostrophe. * toir.cc: Quote keywords, operators, and types in diagnostics. * typeinfo.cc (build_typeinfo): Quote an option name in a diagnostic. gcc/fortran/ChangeLog: * gfortranspec.c (append_arg): Spell out the word "argument." gcc/ChangeLog: * config/i386/i386-expand.c (get_element_number): Quote keywords and other internal names in diagnostics. Adjust other diagnostic formatting issues noted by -Wformat-diag. * config/i386/i386-features.c (ix86_mangle_function_version_assembler_name): Same. * config/i386/i386-options.c (ix86_handle_abi_attribute): Same. * config/i386/i386.c (ix86_function_type_abi): Same. (ix86_function_ms_hook_prologue): Same. (classify_argument): Same. (ix86_expand_prologue): Same. (ix86_md_asm_adjust): Same. (ix86_memmodel_check): Same. gcc/ChangeLog: * builtins.c (expand_builtin_atomic_always_lock_free): Quote identifiers, keywords, operators, and types in diagnostics. Correct quoting, spelling, and sentence capitalization issues. (expand_builtin_atomic_is_lock_free): Same. (fold_builtin_next_arg): Same. * cfgexpand.c (expand_one_var): Same. (tree_conflicts_with_clobbers_p): Same. (expand_asm_stmt): Same. (verify_loop_structure): Same. * cgraphunit.c (process_function_and_variable_attributes): Same. * collect-utils.c (collect_execute): Same. * collect2.c (maybe_run_lto_and_relink): Same. (is_lto_object_file): Same. (scan_prog_file): Same. * convert.c (convert_to_real_1): Same. * dwarf2out.c (dwarf2out_begin_prologue): Same. * except.c (verify_eh_tree): Same. * gcc.c (execute): Same. (eval_spec_function): Same. (run_attempt): Same. (driver::set_up_specs): Same. (compare_debug_auxbase_opt_spec_function): Same. * gcov-tool.c (unlink_gcda_file): Same. (do_merge): Same. (do_rewrite): Same. * gcse.c (gcse_or_cprop_is_too_expensive): Same. * gimplify.c (gimplify_asm_expr): Same. (gimplify_adjust_omp_clauses): Same. * hsa-gen.c (gen_hsa_addr_insns): Same. (gen_hsa_insns_for_load): Same. (gen_hsa_cmp_insn_from_gimple): Same. (gen_hsa_insns_for_operation_assignment): Same. (gen_get_level): Same. (gen_hsa_alloca): Same. (omp_simple_builtin::generate): Same. (gen_hsa_atomic_for_builtin): Same. (gen_hsa_insns_for_call): Same. * input.c (dump_location_info): Same. * ipa-devirt.c (compare_virtual_tables): Same. * ira.c (ira_setup_eliminable_regset): Same. * lra-assigns.c (lra_assign): Same. * lra-constraints.c (lra_constraints): Same. * lto-streamer-in.c (lto_input_mode_table): Same. * lto-wrapper.c (get_options_from_collect_gcc_options): Same. (merge_and_complain): Same. (compile_offload_image): Same. (compile_images_for_offload_targets): Same. (debug_objcopy): Same. (run_gcc): Same. (main): Same. * opts.c (print_specific_help): Same. (parse_no_sanitize_attribute): Same. (print_help): Same. (handle_param): Same. * plugin.c (add_new_plugin): Same. (parse_plugin_arg_opt): Same. (try_init_one_plugin): Same. * print-rtl.c (debug_bb_n_slim): Quote identifiers, keywords, operators, and types in diagnostics. Correct quoting and spelling issues. * read-rtl-function.c (parse_edge_flag_token): Same. (function_reader::parse_enum_value): Same. * reg-stack.c (check_asm_stack_operands): Same. * regcprop.c (validate_value_data): Same. * sched-rgn.c (make_pass_sched_fusion): Same. * stmt.c (check_unique_operand_names): Same. * targhooks.c (default_target_option_pragma_parse): Same. * tlink.c (recompile_files): Same. * toplev.c (process_options): Same. (do_compile): Same. * trans-mem.c (diagnose_tm_1): Same. (ipa_tm_scan_irr_block): Same. (ipa_tm_diagnose_transaction): Same. * tree-cfg.c (verify_address): Same. Use get_tree_code_name to format a tree code name in a diagnostic. (verify_types_in_gimple_min_lval): Same. (verify_types_in_gimple_reference): Same. (verify_gimple_call): Same. (verify_gimple_assign_unary): Same. (verify_gimple_assign_binary): Same. (verify_gimple_assign_ternary): Same. (verify_gimple_assign_single): Same. (verify_gimple_switch): Same. (verify_gimple_label): Same. (verify_gimple_phi): Same. (verify_gimple_in_seq): Same. (verify_eh_throw_stmt_node): Same. (collect_subblocks): Same. (gimple_verify_flow_info): Same. (do_warn_unused_result): Same. * tree-inline.c (expand_call_inline): Same. * tree-into-ssa.c (update_ssa): Same. * tree.c (tree_int_cst_elt_check_failed): Same. (tree_vec_elt_check_failed): Same. (omp_clause_operand_check_failed): Same. (verify_type_variant): Same. (verify_type): Same. * value-prof.c (verify_histograms): Same. * varasm.c (assemble_start_function): Same. gcc/lto/ChangeLog: * lto-dump.c (lto_main): Same. * lto.c (stream_out): Same. gcc/objc/ChangeLog: * objc-act.c (objc_begin_catch_clause): Quote keywords and options in diagnostics. (objc_build_throw_stmt): Same. (objc_finish_message_expr): Same. (get_super_receiver): Same. * objc-next-runtime-abi-01.c (objc_next_runtime_abi_01_init): Spell out "less than" in English./ * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Spell out "greater" in English. gcc/testsuite/ChangeLog: * c-c++-common/Wbool-operation-1.c: Adjust text of expected diagnostics. * c-c++-common/Wvarargs-2.c: Same. * c-c++-common/Wvarargs.c: Same. * c-c++-common/pr51768.c: Same. * c-c++-common/tm/inline-asm.c: Same. * c-c++-common/tm/safe-1.c: Same. * g++.dg/asm-qual-1.C: Same. * g++.dg/asm-qual-3.C: Same. * g++.dg/conversion/dynamic1.C: Same. * g++.dg/cpp0x/constexpr-89599.C: Same. * g++.dg/cpp0x/constexpr-cast.C: Same. * g++.dg/cpp0x/constexpr-shift1.C: Same. * g++.dg/cpp0x/lambda/lambda-conv11.C: Same. * g++.dg/cpp0x/nullptr04.C: Same. * g++.dg/cpp0x/static_assert12.C: Same. * g++.dg/cpp0x/static_assert8.C: Same. * g++.dg/cpp1y/lambda-conv1.C: Same. * g++.dg/cpp1y/pr79393-3.C: Same. * g++.dg/cpp1y/static_assert1.C: Same. * g++.dg/cpp1z/constexpr-if4.C: Same. * g++.dg/cpp1z/constexpr-if5.C: Same. * g++.dg/cpp1z/constexpr-if9.C: Same. * g++.dg/eh/goto2.C: Same. * g++.dg/eh/goto3.C: Same. * g++.dg/expr/static_cast8.C: Same. * g++.dg/ext/flexary5.C: Same. * g++.dg/ext/utf-array-short-wchar.C: Same. * g++.dg/ext/utf-array.C: Same. * g++.dg/ext/utf8-2.C: Same. * g++.dg/gomp/loop-4.C: Same. * g++.dg/gomp/macro-4.C: Same. * g++.dg/gomp/udr-1.C: Same. * g++.dg/init/initializer-string-too-long.C: Same. * g++.dg/other/offsetof9.C: Same. * g++.dg/ubsan/pr63956.C: Same. * g++.dg/warn/Wbool-operation-1.C: Same. * g++.dg/warn/Wtype-limits-Wextra.C: Same. * g++.dg/warn/Wtype-limits.C: Same. * g++.dg/wrappers/pr88680.C: Same. * g++.old-deja/g++.mike/eh55.C: Same. * gcc.dg/Wsign-compare-1.c: Same. * gcc.dg/Wtype-limits-Wextra.c: Same. * gcc.dg/Wtype-limits.c: Same. * gcc.dg/Wunknownprag.c: Same. * gcc.dg/Wunsuffixed-float-constants-1.c: Same. * gcc.dg/asm-6.c: Same. * gcc.dg/asm-qual-1.c: Same. * gcc.dg/cast-1.c: Same. * gcc.dg/cast-2.c: Same. * gcc.dg/cast-3.c: Same. * gcc.dg/cpp/source_date_epoch-2.c: Same. * gcc.dg/debug/pr85252.c: Same. * gcc.dg/dfp/cast-bad.c: Same. * gcc.dg/format/gcc_diag-1.c: Same. * gcc.dg/format/gcc_diag-11.c: Same.New test. * gcc.dg/gcc_diag-11.c: Same.New test. * gcc.dg/gnu-cond-expr-2.c: Same. * gcc.dg/gnu-cond-expr-3.c: Same. * gcc.dg/gomp/macro-4.c: Same. * gcc.dg/init-bad-1.c: Same. * gcc.dg/init-bad-2.c: Same. * gcc.dg/init-bad-3.c: Same. * gcc.dg/pr27528.c: Same. * gcc.dg/pr48552-1.c: Same. * gcc.dg/pr48552-2.c: Same. * gcc.dg/pr59846.c: Same. * gcc.dg/pr61096-1.c: Same. * gcc.dg/pr8788-1.c: Same. * gcc.dg/pr90082.c: Same. * gcc.dg/simd-2.c: Same. * gcc.dg/spellcheck-params-2.c: Same. * gcc.dg/spellcheck-params.c: Same. * gcc.dg/strlenopt-49.c: Same. * gcc.dg/tm/pr52141.c: Same. * gcc.dg/torture/pr51106-1.c: Same. * gcc.dg/torture/pr51106-2.c: Same. * gcc.dg/utf-array-short-wchar.c: Same. * gcc.dg/utf-array.c: Same. * gcc.dg/utf8-2.c: Same. * gcc.dg/warn-sprintf-no-nul.c: Same. * gcc.target/i386/asm-flag-0.c: Same. * gcc.target/i386/inline_error.c: Same. * gcc.target/i386/pr30848.c: Same. * gcc.target/i386/pr39082-1.c: Same. * gcc.target/i386/pr39678.c: Same. * gcc.target/i386/pr57756.c: Same. * gcc.target/i386/pr68843-1.c: Same. * gcc.target/i386/pr79804.c: Same. * gcc.target/i386/pr82673.c: Same. * obj-c++.dg/class-protocol-1.mm: Same. * obj-c++.dg/exceptions-3.mm: Same. * obj-c++.dg/exceptions-4.mm: Same. * obj-c++.dg/exceptions-5.mm: Same. * obj-c++.dg/exceptions-6.mm: Same. * obj-c++.dg/method-12.mm: Same. * obj-c++.dg/method-13.mm: Same. * obj-c++.dg/method-6.mm: Same. * obj-c++.dg/method-7.mm: Same. * obj-c++.dg/method-9.mm: Same. * obj-c++.dg/method-lookup-1.mm: Same. * obj-c++.dg/proto-lossage-4.mm: Same. * obj-c++.dg/protocol-qualifier-2.mm: Same. * objc.dg/call-super-2.m: Same. * objc.dg/class-protocol-1.m: Same. * objc.dg/desig-init-1.m: Same. * objc.dg/exceptions-3.m: Same. * objc.dg/exceptions-4.m: Same. * objc.dg/exceptions-5.m: Same. * objc.dg/exceptions-6.m: Same. * objc.dg/method-19.m: Same. * objc.dg/method-2.m: Same. * objc.dg/method-5.m: Same. * objc.dg/method-6.m: Same. * objc.dg/method-7.m: Same. * objc.dg/method-lookup-1.m: Same. * objc.dg/proto-hier-1.m: Same. * objc.dg/proto-lossage-4.m: Same. From-SVN: r271338
2019-04-25D: Do not add target_libs if phobos is disabledJohannes Pfau2-1/+23
From-SVN: r270571
2019-04-24d/dmd: Merge upstream dmd 423758078Iain Buclaw1-1/+1
Fixes another failing test to pass on BigEndian. Initial patch by Robin Dapp. Reviewed-on: https://github.com/dlang/dmd/pull/9684 gcc/testsuite/ChangeLog: 2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org> * gdc.test/README.gcc: New file. From-SVN: r270536
2019-04-23libphobos: Add D support for S/390 LinuxIain Buclaw2-6/+11
gcc/d/ChangeLog: 2019-04-23 Iain Buclaw <ibuclaw@gdcproject.org> Robin Dapp <rdapp@linux.ibm.com> * typeinfo.cc (create_typeinfo): Write typeinfo flags as uint. gcc/testsuite/ChangeLog: 2019-04-23 Iain Buclaw <ibuclaw@gdcproject.org> Robin Dapp <rdapp@linux.ibm.com> * gdc.dg/link.d: Test if target d_runtime. * gdc.dg/runnable.d: Fix tests to work on BigEndian. * gdc.dg/simd.d: Likewise. libphobos/ChangeLog: 2019-04-23 Iain Buclaw <ibuclaw@gdcproject.org> Robin Dapp <rdapp@linux.ibm.com> * configure.tgt: Add s390*-linux* as a supported target. * libdruntime/gcc/sections/elf_shared.d: import gcc.builtins. (__tls_get_addr_internal): Declare. (TLS_DTV_OFFSET): Define as zero on SystemZ. (getTLSRange): Support getting TLS on SystemZ. * testsuite/libphobos.typeinfo/struct-align.d: New test. Co-Authored-By: Robin Dapp <rdapp@linux.ibm.com> From-SVN: r270523
2019-04-23d: Add support for compiling without libphobos library.Iain Buclaw28-160/+375
Merges upstream dmd 3b3dca8be Reviewed-on: https://github.com/dlang/dmd/pull/9678 gcc/d/ChangeLog: 2019-04-23 Iain Buclaw <ibuclaw@gdcproject.org> * d-builtins.cc (d_init_versions): Add D_BetterC, D_ModuleInfo, D_Exceptions, D_TypeInfo as predefined version conditions. * d-codegen.cc (build_bounds_condition): Generate trap if D asserts are turned off. * d-frontend.cc (getTypeInfoType): Add error when -fno-rtti is set. * d-lang.cc (d_init_options): Initialize new front-end options. (d_handle_option): Handle -fdruntime, -fexceptions, and -frtti. (d_post_options): Turn off D runtime features if -fno-druntime is set. * d-spec.cc (lang_specific_driver): Handle -fdruntime. * d-tree.h (have_typeinfo_p): Add prototype. (build_typeinfo): Update prototype. * decl.cc (DeclVisitor::visit(StructDeclaration)): Create typeinfo only if TypeInfo exists. (DeclVisitor::visit(ClassDeclaration)): Likewise. (DeclVisitor::visit(InterfaceDeclaration)): Likewise. (DeclVisitor::visit(EnumDeclaration)): Likewise. * expr.cc: Update all calls to build_typeinfo. * gdc.texi (Runtime Options): Document -fdruntime and -frtti. * lang.opt: Add -fdruntime and -frtti. * modules.cc (build_module_tree): Create module info only if ModuleInfo exists. * toir.cc (IRVisitor::visit(ThrowStatement)): Update test for -fno-exceptions. * typeinfo.cc (create_tinfo_types): Build internal typeinfo classes only if Object exists. (have_typeinfo_p): New function. (class TypeInfoVisitor): Update all calls to build_typeinfo. (build_typeinfo): Add error when -fno-rtti is set. gcc/testsuite/ChangeLog: 2019-04-23 Iain Buclaw <ibuclaw@gdcproject.org> * gdc.test/fail_compilation/fail2456.d: New test. * gdc.test/fail_compilation/test18312.d: New test. * gdc.test/gdc-test.exp (gdc-convert-args): Handle -betterC. From-SVN: r270518
2019-04-21re PR d/90130 (gdc.test/runnable/test12.d FAILs)Iain Buclaw2-3/+5
PR d/90130 d/dmd: Merge upstream dmd 065fbd452 Fixes endian bug in CTFE, and corrects tests in the D2 testsuite that failed on big endian targets. Initial patch by Robin Dapp. Reviewed-on: https://github.com/dlang/dmd/pull/9665 From-SVN: r270485
2019-04-21d: Use semanticRun to prevent declaration pass from running multiple times.Iain Buclaw2-0/+39
This shouldn't happen during normal traversal of the AST provided from the front-end, however as there are some cases where declarations need to be visited out of order, such as what is being done in PR d/89017, it then becomes necessary to guard against this. gcc/d/ChangeLog: 2019-04-21 Iain Buclaw <ibuclaw@gdcproject.org> * decl.cc (DeclVisitor::visit(Import)): Set semanticRun after completion, guard against being called more than once. (DeclVisitor::visit(StructDeclaration)): Likewise. (DeclVisitor::visit(ClassDeclaration)): Likewise. (DeclVisitor::visit(InterfaceDeclaration)): Likewise. (DeclVisitor::visit(VarDeclaration)): Likewise. (DeclVisitor::visit(TypeInfoDeclaration)): Likewise. From-SVN: r270478
2019-04-21d: Ensure all unittests are registered against the original module.Iain Buclaw2-1/+7
As any unittest functions registered against the testing module when compiling with -fbuilding-libphobos-tests are ignored during the generation of the ModuleInfo data. gcc/d/ChangeLog: 2019-04-21 Iain Buclaw <ibuclaw@gdcproject.org> * modules.cc (register_module_decl): Don't register unittests against the ModuleInfo symbol for -fbuilding-libphobos-tests. From-SVN: r270477
2019-04-17d: Fix the build on hosts missing _MAX and _MAX macros.Iain Buclaw2-1/+24
gcc/d/ChangeLog: 2019-04-17 Iain Buclaw <ibuclaw@gdcproject.org> * d-system.h (POSIX): Define unix as POSIX. (INT32_MAX, INT32_MIN, INT64_MIN, UINT32_MAX, UINT64_MAX): Provide fallback definitions. From-SVN: r270403
2019-04-16d: Use build_exeext suffix for D generator programs.Iain Buclaw2-9/+20
Updated build and invocation of idgen and impcnvgen, ensuring that they are removed when cleaning the build directory. Added BUILD_LIBDEPS on the link command for the generator programs as well, which is necessary when the system installed compiler is not GCC. gcc/d/ChangeLog: 2019-04-16 Iain Buclaw <ibuclaw@gdcproject.org> * Make-lang.in (d.mostyclean): Clean idgen and impcnvgen. (d/idgen): Rename to d/idgen$(build_exeext), add BUILD_LIBDEPS. (d/impcnvgen): Rename to d/impcnvgen$(build_exeext), add BUILD_LIBDEPS. (d/id.c): Call idgen$(build_exeext). (d/impcnvtab.c): Call impcnvgen$(build_exeext). From-SVN: r270397
2019-04-14PR d/87799 Fix D build on windows hostsJohannes Pfau2-0/+10
PR d/87799 * d-system.h (_mkdir): Forward _mkdir on MinGW to mkdir in system.h. * configure.ac: Remove d from unsupported languages on mingw and cygwin. * configure: Regenerate. From-SVN: r270349
2019-04-12d: Add -fbuilding-libphobos-tests optionIain Buclaw5-8/+122
Currently, the druntime and phobos unittests are compiled as a separate check program, then ran by the libphobos.unittest/unittest.exp script. As PR d/89255 notes, this process lacks proper multilib handling. As a first step, a new internal option that instructs the compiler to put the reference to all unittest functions in another symbol has been added. This will allow each module to be compiled separately as a standalone program using dg-runtest without running into collisions in the D runtime module registry. gcc/d/ChangeLog: 2019-04-12 Iain Buclaw <ibuclaw@gdcproject.org> * d-tree.h (DECL_IN_UNITTEST_CONDITION_P): Define. * decl.cc (DeclVisitor): Add in_version_unittest_ field. (DeclVisitor::visit(ConditionalDeclaration)): New override. (DeclVisitor::visit(FuncDeclaration)): Set DECL_IN_UNITTEST_CONDITION_P. * lang.opt (-fbuilding-libphobos-tests): Add option. * modules.cc (current_testing_module): New static variable. (build_module_tree): Generate second moduleinfo symbol to hold reference to unittests if flag_building_libphobos_tests. (register_module_decl): Check DECL_IN_UNITTEST_CONDITION_P to decide which moduleinfo the decl should be registered against. From-SVN: r270301
2019-04-12d/dmd: Merge upstream dmd c185f9df1Iain Buclaw2-1/+3
Adds new virtual isVersionCondition, this is so that in the code generation pass, a ConditionDeclaration's condition can be identified without requiring a Visitor function. Reviewed-on: https://github.com/dlang/dmd/pull/9591 From-SVN: r270300
2019-04-11d/dmd: Merge upstream dmd d7ed327edIain Buclaw2-3/+6
Fixes ICE when accessing empty array in CTFE. Reviewed-on: https://github.com/dlang/dmd/pull/9563 From-SVN: r270294
2019-03-31d: Fix run-time SIGSEGV reading ModuleInfo.flags()Iain Buclaw2-1/+9
The current forced alignment is not necessary, and is problematic on targets that have strict alignment rules. gcc/d/ChangeLog: 2019-03-31 Iain Buclaw <ibuclaw@gdcproject.org> PR d/88462 * modules.cc (layout_moduleinfo_fields): Properly align ModuleInfo, instead of forcing alignment to be 1. From-SVN: r270043
2019-03-30testsuite/gdc.test: Merge upstream dmd 5dd3eccc3Iain Buclaw1-1/+1
The D2 testsuite script has been updated to handle EXTRA_SOURCES and EXTRA_FILES settings being split across multiple lines, which is how they appear in upstream. Reviewed-on: https://github.com/dlang/dmd/pull/9517 gcc/testsuite/ChangeLog: 2019-03-30 Iain Buclaw <ibuclaw@gdcproject.org> * gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to cleanup_extra_files. (dmd2dg): Copy additional files after test is processed. (gdc-do-test): Remove all copied files after test. From-SVN: r270038
2019-03-26d/dmd: Merge upstream dmd ab702e73eIain Buclaw6-17/+46
Fixes memory leak in the front-end symbol mangler, and introduces recognition and rejection of a few more C types and directives. Reviewed-on: https://github.com/dlang/dmd/pull/9492 From-SVN: r269945
2019-03-24d/dmd: Merge upstream dmd 74ac873beIain Buclaw3-5/+6
Introduces a fix for a segfault when building without object.d being present, as well as MinGW host build errors in dmd/root/filename.c. Updates a couple of non-portable tests, removing one and fixing the other. From-SVN: r269897
2019-03-20d: Fix ICE force_type_die, at dwarf2out.c using nested typesIain Buclaw3-7/+49
In functions whose return type is instantiated from a nested template, make sure that all members of the instance are emitted before finishing the outer function, otherwise they will be removed during the prune_unused_types pass. gcc/d/ChangeLog: 2019-03-21 Iain Buclaw <ibuclaw@gdcproject.org> PR d/89017 * d-codegen.cc (d_decl_context): Skip over template instances when finding the context. * decl.cc (DeclVisitor::visit(TemplateDeclaration)): New override. (build_type_decl): Include parameters in name of template types. gcc/testsuite/ChangeLog: 2019-03-21 Iain Buclaw <ibuclaw@gdcproject.org> PR d/89017 * gdc.dg/pr89017.d: New test. From-SVN: r269828
2019-03-15re PR d/88990 (ICE in get_symbol_decl, at d/decl.cc:1097)Iain Buclaw3-2/+3
PR d/88990 d/dmd: Merge upstream dmd 8d4c876c6 The extern storage class flag was wrongly propagated to function scope when starting the semantic pass on the body. Fixes https://gcc.gnu.org/PR88990 Reviewed-on: https://github.com/dlang/dmd/pull/9452 From-SVN: r269708
2019-03-12d/dmd: Merge upstream dmd 19b1454b5Iain Buclaw14-11/+198
Backports fixes for many ICEs that occurred when using the vector .array property in both CTFE and code generation passes. Fixes https://gcc.gnu.org/PR88957 Reviewed-on: https://github.com/dlang/dmd/pull/9438 gcc/d/ChangeLog: 2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org> PR d/88957 * expr.cc (ExprVisitor::visit(VectorArrayExp)): New override. gcc/testsuite/ChangeLog: 2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org> PR d/88957 * gdc.dg/pr88957.d: New test. * gdc.dg/simd.d: Add new vector tests. From-SVN: r269627