- 30 Sep, 2019 25 commits
-
-
Like with the combine.c patch, this one keeps things simple by invalidating values in partially-clobbered registers, rather than trying to tell whether the value in a partially-clobbered register is actually clobbered or not. Again, this is in principle a bug fix, but probably never matters in practice. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * cse.c: Include regs.h and function-abi.h. (invalidate_for_call): Take the call insn as an argument. Use insn_callee_abi to get the ABI of the call and invalidate partially clobbered registers as well as fully clobbered ones. (cse_insn): Update call accordingly. From-SVN: r276317
Richard Sandiford committed -
There shouldn't be many cases in which a useful hard register is live across a call before RA, so we might as well keep things simple and invalidate partially-clobbered registers here, in case the values they hold leak into the call-clobbered part. In principle this is a bug fix for TARGET_HARD_REGNO_CALL_PART_CLOBBERED targets, but in practice it probably doesn't make a difference. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * combine.c: Include function-abi.h. (record_dead_and_set_regs): Use insn_callee_abi to get the ABI of the target of call insns. Invalidate partially-clobbered registers as well as fully-clobbered ones. From-SVN: r276316
Richard Sandiford committed -
...or rather, make the use of the default ABI explicit. That seems OK if not ideal for this heuristic. In practical terms, the code patched here is counting GENERAL_REGS, which are treated in the same way by all concurrent ABI variants on AArch64. It might give bad results if used for interrupt handlers though. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * cfgloopanal.c: Include regs.h and function-abi.h. (init_set_costs): Use default_function_abi to test whether a general register is call-clobbered. From-SVN: r276315
Richard Sandiford committed -
old_insns_match_p just tests whether two instructions are similar enough to merge. With insn_callee_abi it makes more sense to compare the ABIs directly. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls instead of the call-clobbered sets. From-SVN: r276314
Richard Sandiford committed -
All caller-save.c uses of "|= fixed_reg_set" added in a previous patch were redundant, since the sets are later ANDed with ~fixed_reg_set. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * caller-save.c (setup_save_areas): Remove redundant |s of fixed_reg_set. (save_call_clobbered_regs): Likewise. Use the call ABI rather than call_used_or_fixed_regs to decide whether a REG_RETURNED value is useful. From-SVN: r276313
Richard Sandiford committed -
choose_hard_reg_mode previously took a boolean saying whether the mode needed to be call-preserved. This patch replaces it with an optional ABI pointer instead, so that the function can use that to test whether a value is call-saved. default_dwarf_frame_reg_mode uses eh_edge_abi because that's the ABI that matters for unwinding. Targets need to override the hook if they want something different. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * rtl.h (predefined_function_abi): Declare. (choose_hard_reg_mode): Take a pointer to a predefined_function_abi instead of a boolean call_save flag. * config/gcn/gcn.c (gcn_hard_regno_caller_save_mode): Update call accordingly. * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise. * config/ia64/ia64.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise. * config/mips/mips.c (mips_hard_regno_caller_save_mode): Likewise. * config/msp430/msp430.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise. * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise. * config/sh/sh.c (sh_hard_regno_caller_save_mode): Likewise. * reginfo.c (init_reg_modes_target): Likewise. (choose_hard_reg_mode): Take a pointer to a predefined_function_abi instead of a boolean call_save flag. * targhooks.c: Include function-abi.h. (default_dwarf_frame_reg_mode): Update call to choose_hard_reg_mode, using eh_edge_abi to choose the mode. From-SVN: r276312
Richard Sandiford committed -
This patch replaces the rtx_insn argument to targetm.hard_regno_call_part_clobbered with an ABI identifier, since call insns are now just one possible way of getting an ABI handle. This in turn allows predefined_function_abi::initialize to do the right thing for non-default ABIs. The horrible ?: in need_for_call_save_p goes away in a later patch, with the series as a whole removing most direct calls to the hook in favour of function_abi operations. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * target.def (hard_regno_call_part_clobbered): Take an ABI identifier instead of an rtx_insn. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_insn_uint_mode_false): Delete. (hook_bool_uint_uint_mode_false): New function. * hooks.c (hook_bool_insn_uint_mode_false): Delete. (hook_bool_uint_uint_mode_false): New function. * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered): Take an ABI identifier instead of an rtx_insn. * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Likewise. * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): Likewise. * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise. * config/pru/pru.c (pru_hard_regno_call_part_clobbered): Likewise. * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered): Likewise. * config/s390/s390.c (s390_hard_regno_call_part_clobbered): Likewise. * cselib.c: Include function-abi.h. (cselib_process_insn): Update call to targetm.hard_regno_call_part_clobbered, using insn_callee_abi to get the appropriate ABI identifier. * function-abi.cc (predefined_function_abi::initialize): Update call to targetm.hard_regno_call_part_clobbered. * ira-conflicts.c (ira_build_conflicts): Likewise. * ira-costs.c (ira_tune_allocno_costs): Likewise. * lra-constraints.c: Include function-abi.h. (need_for_call_save_p): Update call to targetm.hard_regno_call_part_clobbered, using insn_callee_abi to get the appropriate ABI identifier. * lra-lives.c (check_pseudos_live_through_calls): Likewise. * regcprop.c (copyprop_hardreg_forward_1): Update call to targetm.hard_regno_call_part_clobbered. * reginfo.c (choose_hard_reg_mode): Likewise. * regrename.c (check_new_reg_p): Likewise. * reload.c (find_equiv_reg): Likewise. * reload1.c (emit_reload_insns): Likewise. * sched-deps.c: Include function-abi.h. (deps_analyze_insn): Update call to targetm.hard_regno_call_part_clobbered, using insn_callee_abi to get the appropriate ABI identifier. * sel-sched.c (init_regs_for_mode, mark_unavailable_hard_regs): Update call to targetm.hard_regno_call_part_clobbered. * targhooks.c (default_dwarf_frame_reg_mode): Likewise. From-SVN: r276311
Richard Sandiford committed -
One of the effects of the function_abi series is to make -fipa-ra work for partially call-clobbered registers. E.g. if a call preserves only the low 32 bits of a register R, we handled the partial clobber separately from -fipa-ra, and so treated the upper bits of R as clobbered even if we knew that the target function doesn't touch R. "Fixing" this caused problems for the vzeroupper handling on x86. The pass that inserts the vzerouppers assumes that no 256-bit or 512-bit values are live across a call unless the call takes a 256-bit or 512-bit argument: /* Needed mode is set to AVX_U128_CLEAN if there are no 256bit or 512bit modes used in function arguments. */ This implicitly relies on: /* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. The only ABI that saves SSE registers across calls is Win64 (thus no need to check the current ABI here), and with AVX enabled Win64 only guarantees that the low 16 bytes are saved. */ static bool ix86_hard_regno_call_part_clobbered (rtx_insn *insn ATTRIBUTE_UNUSED, unsigned int regno, machine_mode mode) { return SSE_REGNO_P (regno) && GET_MODE_SIZE (mode) > 16; } The comment suggests that this code is only needed for Win64 and that not testing for Win64 is just a simplification. But in practice it was needed for correctness on GNU/Linux and other targets too, since without it the RA would be able to keep 256-bit and 512-bit values in SSE registers across calls that are known not to clobber them. This patch conservatively treats calls as AVX_U128_ANY if the RA can see that some SSE registers are not touched by a call. There are then no regressions if the ix86_hard_regno_call_part_clobbered check is disabled for GNU/Linux (not something we should do, was just for testing). If in fact we want -fipa-ra to pretend that all functions clobber SSE registers above 128 bits, it'd certainly be possible to arrange that. But IMO that would be an optimisation decision, whereas what the patch is fixing is a correctness decision. So I think we should have this check even so. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/i386/i386.c: Include function-abi.h. (ix86_avx_u128_mode_needed): Treat function calls as AVX_U128_ANY if they preserve some 256-bit or 512-bit SSE registers. From-SVN: r276310
Richard Sandiford committed -
This patch replaces get_call_reg_set_usage with insn_callee_abi, which returns the ABI of the target of a call insn. The ABI's full_reg_clobbers corresponds to regs_invalidated_by_call, whereas many callers instead passed call_used_or_fixed_regs, i.e.: (regs_invalidated_by_call | fixed_reg_set) The patch slavishly preserves the "| fixed_reg_set" for these callers; later patches will clean this up. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * target.def (insn_callee_abi): New hook. (remove_extra_call_preserved_regs): Delete. * doc/tm.texi.in (TARGET_INSN_CALLEE_ABI): New macro. (TARGET_REMOVE_EXTRA_CALL_PRESERVED_REGS): Delete. * doc/tm.texi: Regenerate. * targhooks.h (default_remove_extra_call_preserved_regs): Delete. * targhooks.c (default_remove_extra_call_preserved_regs): Delete. * config/aarch64/aarch64.c (aarch64_simd_call_p): Constify the insn argument. (aarch64_remove_extra_call_preserved_regs): Delete. (aarch64_insn_callee_abi): New function. (TARGET_REMOVE_EXTRA_CALL_PRESERVED_REGS): Delete. (TARGET_INSN_CALLEE_ABI): New macro. * rtl.h (get_call_fndecl): Declare. (cgraph_rtl_info): Fix formatting. Tweak comment for function_used_regs. Remove function_used_regs_valid. * rtlanal.c (get_call_fndecl): Moved from final.c * function-abi.h (insn_callee_abi): Declare. (target_function_abi_info): Mention insn_callee_abi. * function-abi.cc (fndecl_abi): Handle flag_ipa_ra in a similar way to get_call_reg_set_usage did. (insn_callee_abi): New function. * regs.h (get_call_reg_set_usage): Delete. * final.c: Include function-abi.h. (collect_fn_hard_reg_usage): Add fixed and stack registers to function_used_regs before the main loop rather than afterwards. Use insn_callee_abi instead of get_call_reg_set_usage. Exit early if function_used_regs ends up not being useful. (get_call_fndecl): Move to rtlanal.c (get_call_cgraph_rtl_info, get_call_reg_set_usage): Delete. * caller-save.c: Include function-abi.h. (setup_save_areas, save_call_clobbered_regs): Use insn_callee_abi instead of get_call_reg_set_usage. * cfgcleanup.c: Include function-abi.h. (old_insns_match_p): Use insn_callee_abi instead of get_call_reg_set_usage. * cgraph.h (cgraph_node::rtl_info): Take a const_tree instead of a tree. * cgraph.c (cgraph_node::rtl_info): Likewise. Initialize function_used_regs. * df-scan.c: Include function-abi.h. (df_get_call_refs): Use insn_callee_abi instead of get_call_reg_set_usage. * ira-lives.c: Include function-abi.h. (process_bb_node_lives): Use insn_callee_abi instead of get_call_reg_set_usage. * lra-lives.c: Include function-abi.h. (process_bb_lives): Use insn_callee_abi instead of get_call_reg_set_usage. * postreload.c: Include function-abi.h. (reload_combine): Use insn_callee_abi instead of get_call_reg_set_usage. * regcprop.c: Include function-abi.h. (copyprop_hardreg_forward_1): Use insn_callee_abi instead of get_call_reg_set_usage. * resource.c: Include function-abi.h. (mark_set_resources, mark_target_live_regs): Use insn_callee_abi instead of get_call_reg_set_usage. * var-tracking.c: Include function-abi.h. (dataflow_set_clear_at_call): Use insn_callee_abi instead of get_call_reg_set_usage. From-SVN: r276309
Richard Sandiford committed -
This patch adds a target hook that allows targets to return the ABI associated with a particular function type. Generally, when multiple ABIs are in use, it must be possible to tell from a function type and its attributes which ABI it is using. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * target.def (fntype_abi): New target hook. * doc/tm.texi.in (TARGET_FNTYPE_ABI): Likewise. * doc/tm.texi: Regenerate. * target.h (predefined_function_abi): Declare. * function-abi.cc (fntype_abi): Call targetm.calls.fntype_abi, if defined. * config/aarch64/aarch64.h (ARM_PCS_SIMD): New arm_pcs value. * config/aarch64/aarch64.c: Include function-abi.h. (aarch64_simd_abi, aarch64_fntype_abi): New functions. (TARGET_FNTYPE_ABI): Define. From-SVN: r276308
Richard Sandiford committed -
This patch adds new structures and functions for handling multiple ABIs in a translation unit. The structures are: - predefined_function_abi: describes a static, predefined ABI - function_abi: describes either a predefined ABI or a local variant of one (e.g. taking -fipa-ra into account) The patch adds functions for getting the ABI from a given type or decl; a later patch will also add a function for getting the ABI of the target of a call insn. Although ABIs are about much more than call-clobber/saved choices, I wanted to keep the name general in case we add more ABI-related information in future. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * Makefile.in (OBJS): Add function-abi.o. (GTFILES): Add function-abi.h. * function-abi.cc: New file. * function-abi.h: Likewise. * emit-rtl.h (rtl_data::abi): New field. * function.c: Include function-abi.h. (prepare_function_start): Initialize crtl->abi. * read-rtl-function.c: Include regs.h and function-abi.h. (read_rtl_function_body): Initialize crtl->abi. (read_rtl_function_body_from_file_range): Likewise. * reginfo.c: Include function-abi.h. (init_reg_sets_1): Initialize default_function_abi. (globalize_reg): Call add_full_reg_clobber for each predefined ABI when making a register global. * target-globals.h (this_target_function_abi_info): Declare. (target_globals::function_abi_info): New field. (restore_target_globals): Copy it. * target-globals.c: Include function-abi.h. (default_target_globals): Initialize the function_abi_info field. (target_globals): Allocate it. (save_target_globals): Free it. From-SVN: r276307
Richard Sandiford committed -
Fix compile time warning about building the FRV backend by adding missing break statements to the switches in frv_register_move_cost. PR target/85978 * config/frv/frv.c (frv_register_move_cost): Add break statements to avoid falling through to the wrong cases. Tidy code. From-SVN: r276306
Nick Clifton committed -
The aarch64_vector_pcs handling in aarch64_hard_regno_call_part_clobbered checks whether the mode might be bigger than 16 bytes, since on SVE targets the (non-SVE) vector PCS only guarantees that the low 16 bytes are preserved. But for multi-register modes, we should instead test whether each single-register part might be bigger than 16 bytes. (The size is always divided evenly between registers.) The testcase uses XImode as an example where this helps. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered): For multi-registers modes, test how big each register part is. gcc/testsuite/ * gcc.target/aarch64/torture/simd-abi-8.c: New test. From-SVN: r276305
Richard Sandiford committed -
Remove the iq2000_select_section function the iq2000 backend - it never provided any useful functionality. PR target/59205 * config/iq2000/iq2000.c (iq2000_select_section): Delete. (TARGET_ASM_SELECT_SECTION): Remove definition. (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Allow definition. From-SVN: r276304
Nick Clifton committed -
When one passes short-lived fake rtxes to backends in order to test their capabilities, it might be beneficial to allocate these rtxes on stack in order to reduce the load on GC. Provide macro counterparts of some of the gen_* functions for that purpose. gcc/ChangeLog: 2019-09-30 Ilya Leoshkevich <iii@linux.ibm.com> * emit-rtl.c (init_raw_REG): New function. (gen_raw_REG): Use init_raw_REG. * gengenrtl.c (gendef): Emit init_* functions and alloca_* macros. * rtl.c (rtx_alloc_stat_v): Use rtx_init. * rtl.h (rtx_init): New function. (rtx_alloca): New function. (init_raw_REG): New function. (alloca_raw_REG): New macro. From-SVN: r276303
Ilya Leoshkevich committed -
pp_separate_with inserts a space after the separator, so there's no need to add whitespace before "..." as well. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/c-family/ * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing two spaces between a comma and "...". gcc/testsuite/ * gcc.dg/Wincompatible-pointer-types-1.c (f1): Expect only one space between the comma and "...". From-SVN: r276302
Richard Sandiford committed -
2019-09-30 Kwok Cheung Yeung <kcy@codesourcery.com> * libgomp_g.h: Include stdint.h instead of gstdint.h. From-SVN: r276301
Kwok Cheung Yeung committed -
2019-09-30 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/predicates.md (pcrel_address): Delete predicate. (pcrel_local_address): Replace pcrel_address predicate, use the new function address_to_insn_form. (pcrel_external_address): Replace with new implementation using address_to_insn_form.. (prefixed_mem_operand): Delete predicate which is now unused. (pcrel_external_mem_operand): Delete predicate which is now unused. * config/rs6000/rs6000-protos.h (enum insn_form): New enumeration. (enum non_prefixed): New enumeration. (address_to_insn_form): New declaration. (prefixed_load_p): New declaration. (prefixed_store_p): New declaration. (prefixed_paddi_p): New declaration. (rs6000_asm_output_opcode): New declaration. (rs6000_final_prescan_insn): Move declaration and update calling signature. (address_is_prefixed): New helper inline function. * config/rs6000/rs6000.c(print_operand_address): Check for either PC-relative local symbols or PC-relative external symbols. (rs6000_emit_move): Support loading PC-relative addresses. (mode_supports_prefixed_address_p): Delete, no longer used. (rs6000_prefixed_address_mode_p): Delete, no longer used. (address_to_insn_form): New function to decode an address format. (reg_to_non_prefixed): New function to identify what the non-prefixed memory instruction format is for a register. (prefixed_load_p): New function to identify prefixed loads. (prefixed_store_p): New function to identify prefixed stores. (prefixed_paddi_p): New function to identify prefixed load immediates. (next_insn_prefixed_p): New static state variable. (rs6000_final_prescan_insn): New function to determine if an insn uses a prefixed instruction. (rs6000_asm_output_opcode): New function to emit 'p' in front of a prefixed instruction. * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): New target hook. (ASM_OUTPUT_OPCODE): New target hook. * config/rs6000/rs6000.md (prefixed): New insn attribute for prefixed instructions. (prefixed_length): New insn attribute for the size of prefixed instructions. (non_prefixed_length): New insn attribute for the size of non-prefixed instructions. (pcrel_local_addr): New insn to load up a local PC-relative address. (pcrel_extern_addr): New insn to load up an external PC-relative address. (mov<mode>_64bit_dm): Split the alternatives for loading 0.0 to a GPR and loading a 128-bit floating point type to a GPR. From-SVN: r276300
Michael Meissner committed -
2019-09-30 Richard Biener <rguenther@suse.de> * gimple.c (gimple_get_lhs): For PHIs return the result. * tree-vectorizer.h (vectorizable_live_operation): Also get the SLP instance as argument. * tree-vect-loop.c (vect_analyze_loop_operations): Also handle double-reduction PHIs with vectorizable_lc_phi. (vect_analyze_loop_operations): Adjust. (vect_create_epilog_for_reduction): Remove all code not dealing with reduction LC PHI or epilogue generation. (vectorizable_live_operation): Call vect_create_epilog_for_reduction for live stmts of reductions. * tree-vect-stmts.c (vectorizable_condition): When !for_reduction do not handle defs that are not vect_internal_def. (can_vectorize_live_stmts): Adjust. (vect_analyze_stmt): When the vectorized stmt defined a value used on backedges adjust the backedge uses of vectorized PHIs. From-SVN: r276299
Richard Biener committed -
Also fix the constraints on span(Container&) and span(const Container&) constructors so that they aren't used for const spans or const arrays. * include/std/span (span(element_type(&)[N])) (span(array<value_type, N>&), span(const array<value_type, N>&)): Deduce array element type to allow safe const conversions (LWG 3255). [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use remove_cv_t on arguments to __is_std_span and __is_std_array. * testsuite/23_containers/span/lwg3255.cc: New test. From-SVN: r276298
Jonathan Wakely committed -
PR libstdc++/77936 * include/parallel/checkers.h (__is_sorted): Remove unused variable. From-SVN: r276297
Jonathan Wakely committed -
2019-09-30 Martin Jambor <mjambor@suse.cz> PR ipa/91853 * tree-inline.c (force_value_to_type): New function. (setup_one_parameter): Use force_value_to_type to convert type. * tree-inline.c (force_value_to_type): Declare. * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): Deal with register type mismatches. testsuite/ * gcc.dg/ipa/pr91853.c: New test. From-SVN: r276296
Martin Jambor committed -
2019-09-30 Andreas Tobler <andreast@gcc.gnu.org> * config.gcc: Use the secure-plt on FreeBSD 13 and upwards for 32-bit PowerPC. Define TARGET_FREEBSD32_SECURE_PLT for 64-bit PowerPC. * config/rs6000/t-freebsd64: Make use of the above define and build the 32-bit libraries with secure-plt. From-SVN: r276295
Andreas Tobler committed -
PR target/91931 * config/i386/i386-expand.c (ix86_expand_adjust_ufix_to_sfix_si): Use gen_int_mode instead of GEN_INT. * gcc.target/i386/pr91931.c: New test. From-SVN: r276294
Jakub Jelinek committed -
From-SVN: r276276
GCC Administrator committed
-
- 29 Sep, 2019 9 commits
-
-
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91641 * check.c (gfc_check_is_contiguous): null() cannot be an actual argument to is_contiguous(). 2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91641 * gfortran.dg/pr91641.f90: New test. From-SVN: r276272
Steven G. Kargl committed -
Replace the define_expand and two define_insns with a single @macho_low_<mode> and update callers. gcc/ChangeLog: 2019-09-29 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (gen_macho_low):Amend to include the mode argument. (machopic_indirect_data_reference): Amend gen_macho_low call to include mode argument * config/rs6000/rs6000.c (emit_move): Likewise. Amend a comment. * config/rs6000/darwin.md (@macho_low_<mode>): New, replaces the macho_high expander and two define_insn entries. From-SVN: r276271
Iain Sandoe committed -
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91714 * decl.c (gfc_match_decl_type_spec): Issue errors for a few mangled types. 2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91714 * gfortran.dg/dec_type_print_3.f90: Update dg-error regex. * gfortran.dg/pr91714.f90: New test. From-SVN: r276270
Steven G. Kargl committed -
2019-09-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/91726 * resolve.c (gfc_expr_to_initialize): Bail out with a copy of the original expression if the array ref is a scalar and the array_spec has corank. * trans-array.c (gfc_conv_array_ref): Such expressions are OK even if the array ref codimen is zero. * trans-expr.c (gfc_get_class_from_expr): New function taken from gfc_get_vptr_from_expr. (gfc_get_vptr_from_expr): Call new function. * trans-stmt.c (trans_associate_var): If one of these is a target expression, extract the class expression from the target and copy its fields to a new target variable. * trans.h : Add prototype for gfc_get_class_from_expr. 2019-09-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/91726 * gfortran.dg/coarray_poly_9.f90 : New test. From-SVN: r276269
Paul Thomas committed -
PR bootstrap/90543 * optc-save-gen.awk: Fix up printing string option differences. From-SVN: r276268
Jakub Jelinek committed -
gcc/ChangeLog 2019-09-29 Kewen Lin <linkw@gcc.gnu.org> * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower vec_perm cost to 1 for non-Power7 VSX architectures. From-SVN: r276267
Kewen Lin committed -
vectorization on port rs6000. gcc/ChangeLog 2019-09-29 Kewen Lin <linkw@gcc.gnu.org> * config/rs6000/vsx.md (vec_pack[su]_float_v2di): New define_expand. (vec_unpack_[su]fix_trunc_hi_v4sf): Likewise. (vec_unpack_[su]fix_trunc_lo_v4sf): Likewise. gcc/testsuite/ChangeLog 2019-09-29 Kewen Lin <linkw@gcc.gnu.org> * gcc.target/powerpc/conv-vectorize-1.c: New test. * gcc.target/powerpc/conv-vectorize-2.c: New test. From-SVN: r276266
Kewen Lin committed -
2019-09-28 Jerry DeLisle <jvdelisle@gcc.ngu.org> PR fortran/91802 * decl.c (attr_decl1): Return MATCH_ERROR without free to avoid bad expression type in free_expr0() ICE in rank+corank check. From-SVN: r276265
Jerry DeLisle committed -
From-SVN: r276264
GCC Administrator committed
-
- 28 Sep, 2019 6 commits
-
-
2019-09-28 François Dumont <fdumont@gcc.gnu.org> * include/bits/stl_algo.h (merge): Fix documentation. * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr. (__check_sorted): Likewise and remove nested irreflexive check. (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr. (__check_partitioned_lower, __check_partitioned_upper): Likewise. (_Irreflexive_checker::_S_is_valid): Likewise. (__is_irreflexive, __is_irreflexive_pred): Likewise. * include/debug/helper_functions.h (__get_distance): Add constexpr. (__valid_range_aux): Add C++20 constexpr. (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)): Likewise and add std::is_constant_evaluated check. (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New. (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New. (__valid_range_aux(_Integral, _Integral, std::__true_type)): New, use latter. (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and __builtin_is_contant_evaludated check.. (__can_advance, __base): Add constexpr. * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED] (_GLIBCXX_DEBUG_VERIFY_COND_AT): New. (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive. (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred. * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive std::less. * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise. * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix lambda to be irreflexive. From-SVN: r276260
François Dumont committed -
Drop the expander and use a mode iterator on the define_insn for @macho_high_<mode> instead. gcc/ChangeLog: 2019-09-28 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (gen_macho_high): Amend to include the mode argument. (machopic_indirect_data_reference): Amend gen_macho_high call to include mode argument. (machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): * config/rs6000/darwin.md (@macho_high_<mode>): New, replaces the macho_high expander and two define_insn entries. From-SVN: r276256
Iain Sandoe committed -
2019-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/91593 * io/io.h: Add gcc_unreachable(). * io/transfer.c (file_mode, current_mode, formatted_transfer_scalar_read, formatted_transfer_scalar_write, pre_position, next_record_r, next_record_w): Add and use FORMATTED_UNSPECIFIED to enumeration. From-SVN: r276255
Jerry DeLisle committed -
2019-09-28 Steven G. Kargl <kargl@gcc.ngu.org> PR fortran/91802 * decl.c (attr_decl1): Check if rank+corank > 15. 2019-09-28 Steven G. Kargl <kargl@gcc.ngu.org> PR fortran/91802 * gfortran.dg/pr91802.f90: New test. From-SVN: r276254
Steven G. Kargl committed -
2019-09-28 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91864 * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be read into. * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter can be neither an allocate-object nor stat variable. (gfc_match_deallocate): An inquiry parameter cannot be deallocated. 2019-09-28 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91864 * gcc/testsuite/gfortran.dg/pr91864.f90 From-SVN: r276253
Steven G. Kargl committed -
* call.c (involves_qualification_conversion_p): New function. (direct_reference_binding): Build a ck_qual if the conversion would involve a qualification conversion. (convert_like_real): Strip the conversion created by the ck_qual in direct_reference_binding. * g++.dg/cpp0x/ref-bind3.C: Add dg-error. * g++.dg/cpp0x/ref-bind4.C: New test. * g++.dg/cpp0x/ref-bind5.C: New test. * g++.dg/cpp0x/ref-bind6.C: New test. * g++.old-deja/g++.pt/spec35.C: Revert earlier change. From-SVN: r276251
Marek Polacek committed
-