1. 20 Jul, 2019 7 commits
    • re PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3) · 4b3df265
      	PR target/91204
      	* optabs.c (expand_unop): As fallback, expand ~op0 as op0 ^ -1.
      
      	* gcc.c-torture/compile/pr91204.c: New test.
      
      From-SVN: r273629
      Jakub Jelinek committed
    • pa.h (hppa_profile_hook): Delete declaration. · 7604f435
      	* config/pa/pa.h (hppa_profile_hook): Delete declaration.
      	* config/pa/pa-protos.h (hppa_profile_hook): Add declaration.
      
      From-SVN: r273628
      John David Anglin committed
    • Fix ICE on class template argument deduction with inherited ctor. · 2dc10705
      In general, when we see a dependent using-declaration we don't know whether
      it names a function or not, so it doesn't get an OVERLOAD unless we see
      overloads of the same name in the current class.  In the case of an
      inherited constructor we could figure that out from the name, but it's
      simpler to handle USING_DECL properly.
      
      	* cp-tree.h (ovl_iterator::using_p): A USING_DECL by itself was also
      	introduced by a using-declaration.
      
      From-SVN: r273623
      Jason Merrill committed
    • Reduce memory consumption for push/pop_access_scope. · 1ab1f350
      I was seeing memory consumption issues on the concepts-cxx2a
      branch. push_scope was, surprisingly, at the top of -fmem-report, and
      push_access_scope was pretty high.  Fixing them was pretty simple.
      
      	* name-lookup.c (leave_scope): Do add class levels other than
      	previous_class_level to free_binding_level.
      	(invalidate_class_lookup_cache): Move from class.c, add to
      	free_binding_level.
      	* pt.c (saved_access_scope): Change from list to vec.
      
      From-SVN: r273622
      Jason Merrill committed
    • tree.def (OMP_LOOP): New tree code. · 554a530f
      	* tree.def (OMP_LOOP): New tree code.
      	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_BIND.
      	(enum omp_clause_bind_kind): New enum.
      	(struct tree_omp_clause): Add subcode.bind_kind.
      	* tree.h (OMP_LOOP_CHECK): Rename to ...
      	(OMP_LOOPING_CHECK): ... this.
      	(OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND,
      	OMP_FOR_INCR, OMP_FOR_PRE_BODY, OMP_FOR_ORIG_DECLS): Use
      	OMP_LOOPING_CHECK instead of OMP_LOOP_CHECK.
      	(OMP_CLAUSE_BIND_KIND): Define.
      	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add
      	bind clause entries.
      	(walk_tree_1): Handle OMP_CLAUSE_BIND.
      	* tree-pretty-print.c (dump_omp_clause): Likewise.
      	(dump_generic_node): Handle OMP_LOOP.
      	* gimplify.c (enum omp_region_type): Add ORT_IMPLICIT_TARGET.
      	(in_omp_construct): New variable.
      	(is_gimple_stmt): Handle OMP_LOOP.
      	(gimplify_scan_omp_clauses): For lastprivate don't set
      	check_non_private if code == OMP_LOOP.  For reduction clause
      	on OMP_LOOP combined with parallel or teams propagate as shared
      	on the combined construct.  Handle OMP_CLAUSE_BIND.
      	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_BIND.
      	(gimplify_omp_for): Pass OMP_LOOP instead of OMP_{FOR,DISTRIBUTE}
      	for constructs from a loop construct to gimplify_scan_omp_clauses.
      	Don't predetermine iterator linear on OMP_SIMD from loop construct.
      	(replace_reduction_placeholders, gimplify_omp_loop): New functions.
      	(gimplify_omp_workshare): Use ORT_IMPLICIT_TARGET instead of trying
      	to match the implicit ORT_TARGET construct around whole body.
      	Temporarily clear in_omp_construct when processing body.
      	(gimplify_expr): Handle OMP_LOOP.  For OMP_MASTER, OMP_TASKGROUP
      	etc. temporarily set in_omp_construct when processing body.
      	(gimplify_body): Create ORT_IMPLICIT_TARGET instead of ORT_TARGET.
      	* omp-low.c (struct omp_context): Add loop_p.
      	(build_outer_var_ref): Treat ctx->loop_p similarly to simd construct
      	in that the original var might be private.
      	(scan_sharing_clauses): Handle OMP_CLAUSE_BIND.
      	(check_omp_nesting_restrictions): Adjust nesting restrictions for
      	addition of loop construct.
      	(scan_omp_1_stmt): Allow setjmp inside of loop construct.
      gcc/c-family/
      	* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
      	(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
      	* c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
      	* c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
      	* c-omp.c (c_omp_split_clauses): Add support for 4 new combined
      	constructs with the loop construct.
      gcc/c/
      	* c-parser.c (c_parser_omp_clause_name): Handle bind clause.
      	(c_parser_omp_clause_bind): New function.
      	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
      	(OMP_LOOP_CLAUSE_MASK): Define.
      	(c_parser_omp_loop): New function.
      	(c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
      	loop combined with parallel or teams.
      	(c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
      	* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
      gcc/cp/
      	* cp-tree.h (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOPING_CHECK
      	instead of OMP_LOOP_CHECK.
      	* parser.c (cp_parser_omp_clause_name): Handle bind clause.
      	(cp_parser_omp_clause_bind): New function.
      	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
      	(OMP_LOOP_CLAUSE_MASK): Define.
      	(cp_parser_omp_loop): New function.
      	(cp_parser_omp_parallel, cp_parser_omp_teams): Handle parsing of
      	loop combined with parallel or teams.
      	(cp_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
      	(cp_parser_pragma): Likewise.
      	* pt.c (tsubst_expr): Handle OMP_LOOP.
      	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_BIND.
      gcc/testsuite/
      	* c-c++-common/gomp/cancel-1.c: Adjust expected diagnostic wording.
      	* c-c++-common/gomp/clauses-1.c (foo, baz, bar): Add order(concurrent)
      	clause where allowed.  Add combined constructs with loop with all
      	possible clauses.
      	(qux): New function.
      	* c-c++-common/gomp/loop-1.c: New test.
      	* c-c++-common/gomp/loop-2.c: New test.
      	* c-c++-common/gomp/loop-3.c: New test.
      	* c-c++-common/gomp/loop-4.c: New test.
      	* c-c++-common/gomp/loop-5.c: New test.
      	* c-c++-common/gomp/order-3.c: Adjust expected diagnostic wording.
      	* c-c++-common/gomp/simd-setjmp-1.c: New test.
      	* c-c++-common/gomp/teams-2.c: Adjust expected diagnostic wording.
      libgomp/
      	* testsuite/libgomp.c-c++-common/loop-1.c: New test.
      
      From-SVN: r273621
      Jakub Jelinek committed
    • omp-low.c (lower_rec_input_clauses): Don't force simd arrays for lastprivate… · b6339213
      omp-low.c (lower_rec_input_clauses): Don't force simd arrays for lastprivate non-addressable iterator of a...
      
      	* omp-low.c (lower_rec_input_clauses): Don't force simd arrays for
      	lastprivate non-addressable iterator of a collapse(1) simd.
      
      	* gcc.dg/vect/vect-simd-16.c: New test.
      
      From-SVN: r273620
      Jakub Jelinek committed
    • Daily bump. · 05584e7c
      From-SVN: r273615
      GCC Administrator committed
  2. 19 Jul, 2019 17 commits
    • compiler: don't export bodies for functions marked "go:noinline" · aa4d56e2
          
          The current Mark_inline_candidates helper looks only at budget when
          deciding to mark a function or method as inline (with the proviso that
          IR constructs not yet supported by the inliner are given artificially
          high cost). This patch changes the helper to also look at whether a
          function has the "go:noinline" pragma; if it does have the pragma
          there is no point putting it into the export data (it will just make
          the export data bigger).
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186923
      
      From-SVN: r273611
      Ian Lance Taylor committed
    • rs6000-call.c (HAVE_AS_GNU_ATTRIBUTE): define value as in rs6000.c. · c3550462
      2019-07-17  Bill Seurer  <seurer@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000-call.c (HAVE_AS_GNU_ATTRIBUTE): define value
      	as in rs6000.c.
      
      From-SVN: r273610
      Bill Seurer committed
    • stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation. · 2be3193b
      2019-07-19  François Dumont  <fdumont@gcc.gnu.org>
      
      	* include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
      	sized deallocation size computation.
      
      From-SVN: r273609
      François Dumont committed
    • [Darwin] More specs TLC. · db67ea0f
      This strips out a few driver specs that are only specifying a default state.
      Also warn on an option now ignored, and add some comments to the driver specs
      section.
      
      2019-07-19  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin.h (DRIVER_SELF_SPECS): Ignore X and Mach specs which
      	refer to default conditions.  Warn for the 'y' spec which is ignored
      	by current linkers.
      
      From-SVN: r273608
      Iain Sandoe committed
    • [PATCH, rs6000] Split up rs6000.c. · 1acf0246
      The source file rs6000.c has grown to unreasonable size and is being
      split up into several smaller source files.  This should improve
      compilation speed for building gcc.
      
      This is the second of several patches to do this and moves most of the
      function call and builtin code to a new source file.
      
      Bootstrapped and tested on powerpc64le-unknown-linux-gnu and
      powerpc64-unknown-linux-gnu with no regressions.  Is this ok for trunk?
      
      
      2019-07-17  Bill Seurer  <seurer@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000.c (builtin_description, cpu_is_info,
      	cpu_supports_info, builtin_hash_struct, builtin_hasher,
      	builtin_hash_table, rs6000_builtin_info_type, rs6000_builtin_info,
      	rs6000_aggregate_candidate, rs6000_discover_homogeneous_aggregate,
      	rs6000_return_in_memory, rs6000_return_in_msb, call_ABI_of_interest,
      	init_cumulative_args, rs6000_promote_function_mode,
      	rs6000_must_pass_in_stack, is_complex_IBM_long_double,
      	abi_v4_pass_in_fpr, rs6000_function_arg_padding,
      	rs6000_function_arg_boundary, rs6000_parm_offset,
      	rs6000_parm_start, rs6000_arg_size,
      	rs6000_darwin64_record_arg_advance_flush,
      	rs6000_darwin64_record_arg_advance_recurse,
      	rs6000_darwin64_struct_check_p, rs6000_function_arg_advance_1,
      	rs6000_function_arg_advance, rs6000_darwin64_record_arg_flush,
      	rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
      	rs6000_mixed_function_arg, rs6000_psave_function_arg,
      	rs6000_finish_function_arg, rs6000_function_arg,
      	rs6000_arg_partial_bytes, rs6000_pass_by_reference,
      	rs6000_parm_needs_stack, rs6000_function_parms_need_stack,
      	rs6000_reg_parm_stack_space, rs6000_move_block_from_reg,
      	setup_incoming_varargs, rs6000_build_builtin_va_list, rs6000_va_start,
      	rs6000_gimplify_va_arg, def_builtin, bdesc_3arg, bdesc_dst,
      	bdesc_2arg, bdesc_altivec_preds, bdesc_abs, bdesc_1arg, bdesc_0arg,
      	bdesc_htm, rs6000_overloaded_builtin_p, rs6000_overloaded_builtin_name,
      	rs6000_expand_zeroop_builtin, rs6000_expand_mtfsf_builtin,
      	rs6000_expand_mtfsb_builtin, rs6000_expand_set_fpscr_rn_builtin,
      	rs6000_expand_set_fpscr_drn_builtin, rs6000_expand_unop_builtin,
      	altivec_expand_abs_builtin, rs6000_expand_binop_builtin,
      	altivec_expand_predicate_builtin, swap_endian_selector_for_mode,
      	altivec_expand_lv_builtin, altivec_expand_stxvl_builtin,
      	altivec_expand_stv_builtin, htm_spr_num, rs6000_htm_spr_icode,
      	htm_expand_builtin, cpu_expand_builtin, rs6000_expand_ternop_builtin,
      	altivec_expand_dst_builtin, altivec_expand_vec_init_builtin,
      	get_element_number, altivec_expand_vec_set_builtin,
      	altivec_expand_vec_ext_builtin, altivec_expand_builtin,
      	rs6000_builtin_is_supported_p, rs6000_invalid_builtin,
      	rs6000_fold_builtin, rs6000_builtin_valid_without_lhs,
      	fold_build_vec_cmp, fold_compare_helper, fold_mergehl_helper,
      	fold_mergeeo_helper, rs6000_gimple_fold_builtin,
      	rs6000_expand_builtin, rs6000_vector_type,
      	rs6000_init_builtins, rs6000_builtin_decl, altivec_init_builtins,
      	htm_init_builtins, builtin_function_type, rs6000_common_init_builtins,
      	rs6000_internal_arg_pointer, rs6000_output_mi_thunk): Move
      	to rs6000-call.c.
      	* config/rs6000/rs6000-call.c (builtin_description, cpu_is_info,
      	cpu_supports_info, builtin_hash_struct, builtin_hasher,
      	builtin_hash_table, rs6000_builtin_info_type, rs6000_builtin_info,
      	rs6000_aggregate_candidate, rs6000_discover_homogeneous_aggregate,
      	rs6000_return_in_memory, rs6000_return_in_msb, call_ABI_of_interest,
      	init_cumulative_args, rs6000_promote_function_mode,
      	rs6000_must_pass_in_stack, is_complex_IBM_long_double,
      	abi_v4_pass_in_fpr, rs6000_function_arg_padding,
      	rs6000_function_arg_boundary, rs6000_parm_offset,
      	rs6000_parm_start, rs6000_arg_size,
      	rs6000_darwin64_record_arg_advance_flush,
      	rs6000_darwin64_record_arg_advance_recurse,
      	rs6000_darwin64_struct_check_p, rs6000_function_arg_advance_1,
      	rs6000_function_arg_advance, rs6000_darwin64_record_arg_flush,
      	rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
      	rs6000_mixed_function_arg, rs6000_psave_function_arg,
      	rs6000_finish_function_arg, rs6000_function_arg,
      	rs6000_arg_partial_bytes, rs6000_pass_by_reference,
      	rs6000_parm_needs_stack, rs6000_function_parms_need_stack,
      	rs6000_reg_parm_stack_space, rs6000_move_block_from_reg,
      	setup_incoming_varargs, rs6000_build_builtin_va_list, rs6000_va_start,
      	rs6000_gimplify_va_arg, def_builtin, bdesc_3arg, bdesc_dst,
      	bdesc_2arg, bdesc_altivec_preds, bdesc_abs, bdesc_1arg, bdesc_0arg,
      	bdesc_htm, rs6000_overloaded_builtin_p, rs6000_overloaded_builtin_name,
      	rs6000_expand_zeroop_builtin, rs6000_expand_mtfsf_builtin,
      	rs6000_expand_mtfsb_builtin, rs6000_expand_set_fpscr_rn_builtin,
      	rs6000_expand_set_fpscr_drn_builtin, rs6000_expand_unop_builtin,
      	altivec_expand_abs_builtin, rs6000_expand_binop_builtin,
      	altivec_expand_predicate_builtin, swap_endian_selector_for_mode,
      	altivec_expand_lv_builtin, altivec_expand_stxvl_builtin,
      	altivec_expand_stv_builtin, htm_spr_num, rs6000_htm_spr_icode,
      	htm_expand_builtin, cpu_expand_builtin, rs6000_expand_ternop_builtin,
      	altivec_expand_dst_builtin, altivec_expand_vec_init_builtin,
      	get_element_number, altivec_expand_vec_set_builtin,
      	altivec_expand_vec_ext_builtin, altivec_expand_builtin,
      	rs6000_builtin_is_supported_p, rs6000_invalid_builtin,
      	rs6000_fold_builtin, rs6000_builtin_valid_without_lhs,
      	fold_build_vec_cmp, fold_compare_helper, fold_mergehl_helper,
      	fold_mergeeo_helper, rs6000_gimple_fold_builtin,
      	rs6000_expand_builtin, rs6000_vector_type,
      	rs6000_init_builtins, rs6000_builtin_decl, altivec_init_builtins,
      	htm_init_builtins, builtin_function_type, rs6000_common_init_builtins,
      	rs6000_internal_arg_pointer, rs6000_output_mi_thunk: Move
      	to here from rs6000.c.
      	* config/rs6000/rs6000-internal.h: (rs6000_darwin64_struct_check_p,
      	rs6000_discover_homogeneous_aggregate, rs6000_output_mi_thunk,
      	rs6000_output_addr_const_extra, rs6000_gimple_fold_builtin,
      	rs6000_invalid_builtin, rs6000_build_builtin_va_list, rs6000_va_start,
      	rs6000_gimplify_va_arg, rs6000_promote_function_mode,
      	rs6000_return_in_memory, rs6000_return_in_msb,
      	rs6000_pass_by_reference, setup_incoming_varargs,
      	rs6000_function_arg_boundary, rs6000_must_pass_in_stack,
      	rs6000_arg_partial_bytes, rs6000_function_arg_advance,
      	rs6000_function_arg_padding, rs6000_function_arg,
      	rs6000_darwin64_record_arg, rs6000_internal_arg_pointer,
      	rs6000_init_builtins, rs6000_builtin_decl, rs6000_expand_builtin,
      	rs6000_fold_builtin, rs6000_passes_ieee128, rs6000_passes_float,
      	rs6000_passes_long_double, rs6000_passes_vector,
      	rs6000_returns_struct, cpu_builtin_p, tree builtin_mode_to_type,
      	altivec_builtin_mask_for_load) Add declarations.
      	* config/rs6000/t-rs6000: Add new source file rs6000-call.c.
      	* config/config.gcc: Add new source file rs6000-call.c to garbage
      	collector and extra_objs.
      
      From-SVN: r273607
      Bill Seurer committed
    • tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle strncpy. · 192ece9e
      	* tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle
      	strncpy.  Drop some trivial dead code.
      	(maybe_trim_memstar_call): Handle strncpy.
      
      	* gcc.dg/tree-ssa/ssa-dse-37.c: New test.
      	* gcc.dg/tree-ssa/ssa-dse-38.c: New test.
      
      From-SVN: r273606
      Jeff Law committed
    • re PR tree-optimization/91211 (wrong code with __builtin_memset() and… · 6b68f00d
      re PR tree-optimization/91211 (wrong code with __builtin_memset() and __builtin_memcpy() at -O1 and above)
      
      2019-07-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91211
      	* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Fix
      	memset encoding size.
      
      	* gcc.dg/torture/pr91211.c: New testcase.
      
      From-SVN: r273605
      Richard Biener committed
    • re PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3) · d826ea32
      	PR target/91204
      	* config/i386/mmx.md (one_cmpl<mode>2): New expander.
      
      From-SVN: r273604
      Uros Bizjak committed
    • re PR ipa/91194 (A suspicious condition in recursive_inlining) · 4eb50396
      	PR ipa/91194
      	* ipa-inline.c (recursive_inlining): Fix limits check.
      
      From-SVN: r273603
      Jan Hubicka committed
    • re PR tree-optimization/91200 (ICE on valid code at -O1: verify_ssa failed) · a263e61a
      2019-07-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91200
      	* tree-ssa-phiopt.c (cond_store_replacement): Check we have
      	no PHI nodes in middle-bb.
      
      	* gcc.dg/torture/pr91200.c: New testcase.
      
      From-SVN: r273602
      Richard Biener committed
    • [AArch64] Rename +bitperm to +sve2-bitperm · c10abf53
      After some discussion, we've decided to rename the +bitperm feature
      flag to +sve2-bitperm, so that it's consistent with the other SVE2
      feature flags.  The associated macro was already
      __ARM_FEATURE_SVE2_BITPERM, so only the feature flag itself
      needs to change.
      
      2019-07-19  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* doc/invoke.texi: Rename the AArch64 +bitperm extension flag
      	to +sve-bitperm.
      	* config/aarch64/aarch64-option-extensions.def: Likewise.
      
      From-SVN: r273600
      Richard Sandiford committed
    • re PR middle-end/91190 (ICE on valid code: in hashtab_chk_error, at hash-table.c:137) · 14298fa4
      	PR middle-end/91190
      	* function.c (insert_temp_slot_address): Store into the hash table
      	a copy of address to avoid RTL sharing issues.
      
      	* gcc.c-torture/compile/pr91190.c: New test.
      
      From-SVN: r273599
      Jakub Jelinek committed
    • re PR tree-optimization/91207 (Wrong code with -O3) · bc59a4cf
      2019-07-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91207
      	Revert
      	2019-07-17  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91178
      	* tree-vect-stmts.c (get_group_load_store_type): For SLP
      	loads with a gap larger than the vector size always use
      	VMAT_STRIDED_SLP.
      	(vectorizable_load): For VMAT_STRIDED_SLP with a permutation
      	avoid loading vectors that are only contained in the gap
      	and thus are not needed.
      
      	* gcc.dg/torture/pr91207.c: New testcase.
      
      From-SVN: r273593
      Richard Biener committed
    • PR c++/90101 - dependent class non-type parameter. · daaa6fcc
      We shouldn't complain that a dependent type is incomplete.
      
      	* pt.c (invalid_nontype_parm_type_p): Check for dependent class type.
      
      From-SVN: r273592
      Jason Merrill committed
    • PR c++/90098 - partial specialization and class non-type parms. · 59febe0e
      A non-type template parameter of class type used in an expression has
      const-qualified type; the pt.c hunks deal with this difference from the
      unqualified type of the parameter declaration.  WAhen we use such a
      parameter as an argument to another template, we don't want to confuse
      things by copying it, we should pass it straight through.  And we might as
      well skip copying other classes in constant evaluation context in a
      template, too; we'll get the copy semantics at instantiation time.
      
      	PR c++/90099
      	PR c++/90101
      	* call.c (build_converted_constant_expr_internal): Don't copy.
      	* pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR
      	around class non-type parameter.
      	(unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals.
      
      From-SVN: r273591
      Jason Merrill committed
    • Daily bump. · a349418e
      From-SVN: r273590
      GCC Administrator committed
  3. 18 Jul, 2019 16 commits
    • stl_tempbuf.h (__detail::__return_temporary_buffer): New. · f48d9d19
      2019-07-18  François Dumont  <fdumont@gcc.gnu.org>
      
      	* include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
      	(~_Temporary_buffer()): Use latter.
      	(_Temporary_buffer(_FIterator, size_type)): Likewise.
      
      From-SVN: r273586
      François Dumont committed
    • i386.md (*addqi_2_slp): Remove. · 2737c590
      	* config/i386/i386.md (*addqi_2_slp): Remove.
      	(*<code>qi_2_slp): Ditto.
      
      From-SVN: r273583
      Uros Bizjak committed
    • Rename function. · 3f4ef678
      2019-07-18  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/predicates.md (prefixed_mem_operand): Call
      	rs6000_prefixed_address_mode_p instead of rs6000_prefixed_address.
      	* config/rs6000/rs6000-protos.h (rs6000_prefixed_address_mode_p):
      	Rename function from rs6000_prefixed_address.
      	* config/rs6000/rs6000.c (rs6000_prefixed_address_mode_p): Rename
      	function from rs6000_prefixed_address.
      
      From-SVN: r273580
      Michael Meissner committed
    • Update PowerPC compiler for pc-relative support. · 9ae813e8
      2019-07-18  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/aix.h (TARGET_HAS_TOC): Rename TARGET_TOC to
      	TARGET_HAS_TOC.
      	(TARGET_TOC): Likewise.
      	(TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in
      	rs6000.h.
      	* config/rs6000/darwin.h (TARGET_HAS_TOC): Rename TARGET_TOC to
      	TARGET_HAS_TOC.
      	(TARGET_TOC): Likewise.
      	(TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in
      	rs6000.h.
      	* config/rs6000/linux64.h (TARGET_HAS_TOC): Rename TARGET_TOC to
      	TARGET_HAS_TOC.
      	(TARGET_TOC): Likewise.
      	* config/rs6000/rs6000.c (rs6000_option_override_internal): Add
      	check to require -mcmodel=medium for pc-relative addressing.
      	(create_TOC_reference): Add assertion for TARGET_TOC.
      	(rs6000_legitimize_address): Use TARGET_NO_TOC_OR_PCREL instead of
      	TARGET_NO_TOC.
      	(rs6000_emit_move): Likewise.
      	(TOC_alias_set): Rename TOC alias set static variable from 'set'
      	to 'TOC_alias_set'.
      	(get_TOC_alias_set): Likewise.
      	(output_toc): Use TARGET_NO_TOC_OR_PCREL instead of
      	TARGET_NO_TOC.
      	(rs6000_can_eliminate): Likewise.
      	* config/rs6000/rs6000.h (TARGET_TOC): Define in terms of
      	TARGET_HAS_TOC and not pc-relative.
      	(TARGET_NO_TOC_OR_PCREL): New macro to replace TARGET_NO_TOC.
      	* config/rs6000/sysv4.h (TARGET_HAS_TOC): Rename TARGET_TOC to
      	TARGET_HAS_TOC.
      	(TARGET_TOC): Likewise.
      	(TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in
      	rs6000.h.
      
      From-SVN: r273579
      Michael Meissner committed
    • re PR target/91188 (strict_low_part operations do not work) · 07d7662f
      	PR target/91188
      	* config/i386/i386.md (*addqi_1_slp): Use register_operand predicate
      	for operand 0.  Do not use (match_dup) to match operand 1 with
      	operand 0.  Add check in insn constraint that either input operand
      	matches operand 0.  Use SWI12 mode iterator to also handle
      	HImode operands.
      	(*and<mode>_1_slp): Ditto.
      	(*<code>qi_1_slp): Ditto.
      	(*sub<mode>_1_slp): Use register_operand predicate for operand 0.
      	Do not use (match_dup) to match operand 1 with operand 0.  Add
      	check in insn constraint that operand 1 matches operand 0.
      	Use SWI12 mode iterator to also handle HImode operands.
      	(*ashl<mode>3_1_slp): Ditto.
      	(*<shift_insn><mode>3_1_slp): Ditto.
      	(*<rotate_insn><mode>3_1_slp): Ditto.
      
      testsuite/ChangeLog:
      
      	PR target/91188
      	* gcc.target/i386/pr91188-1a.c: New test.
      	* gcc.target/i386/pr91188-1b.c: Ditto.
      	* gcc.target/i386/pr91188-1c.c: Ditto.
      	* gcc.target/i386/pr91188-2a.c: Ditto.
      	* gcc.target/i386/pr91188-2b.c: Ditto.
      	* gcc.target/i386/pr91188-2c.c: Ditto.
      
      From-SVN: r273578
      Uros Bizjak committed
    • compiler: fix bug in importing blocks from inline functions · 36729568
          
          This patch fixes a buglet in the function body importer. Add hooks for
          keeping a stack of blocks corresponding to the block nesting in the
          imported function. This ensures that local variables and temps wind up
          correctly scoped and don't introduce collisions.
          
          New test case for this problem in CL 186717.
          
          Fixes golang/go#33158.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186757
      
      From-SVN: r273577
      Ian Lance Taylor committed
    • Makefile.rtl, [...]: Introduce a "STANDALONE" mode where C runtime files do not… · a6fc663e
      Makefile.rtl, [...]: Introduce a "STANDALONE" mode where C runtime files do not have any dependency...
      
      	* Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
      	cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
      	argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
      	seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
      	runtime files do not have any dependency on GCC include files.
      	Remove unnecessary includes.
      	Remove remaining references to VMS in runtime C file.
      	* runtime.h: new File.
      
      From-SVN: r273576
      Arnaud Charlet committed
    • [patch2/2][arm]: remove builtin expand for sha1 · b9a01009
      This patch removes the builtin expand handling for sha1h/c/m/p and
      replaces it with expand patterns. This should make it more consistent
      with how we handle intrinsic implementations and cleans up the custom
      sha1 code in the arm_expand builtins for unop and ternop.
      
      2019-07-18  Sylvia Taylor  <sylvia.taylor@arm.com>
      
      	* config/arm/arm-builtins.c
      	(arm_expand_ternop_builtin): Remove explicit sha1 builtin handling.
      	(arm_expand_unop_builtin): Likewise.
      	* config/arm/crypto.md
      	(crypto_sha1h): Convert from define_insn to define_expand.
      	(crypto_<crypto_pattern>): Likewise.
      	(crypto_sha1h_lb): New define_insn.
      	(crypto_<crypto_pattern>_lb): Likewise.
      
      From-SVN: r273575
      Sylvia Taylor committed
    • [patch1/2][arm][PR90317]: fix sha1 patterns · e38341a8
      This patch fixes:
      
      1) Ice message thrown when using the crypto_sha1h intrinsic due to
      incompatible mode used for zero_extend. Removed zero extend as it is
      not a good choice for vector modes and using an equivalent single
      mode like TI (128bits) instead of V4SI produces extra instructions
      making it inefficient.
      
      This affects gcc version 8 and above.
      
      2) Incorrect combine optimizations made due to vec_select usage
      in the sha1 patterns on arm. The patterns should only combine
      a vec select within a sha1h<op> instruction when the lane is 0.
      
      This affects gcc version 5 and above.
      
      - Fixed by explicitly declaring the valid const int for such
      optimizations. For cases when the lane is not 0, the vector
      lane selection now occurs in a e.g. vmov instruction prior
      to sha1h<op>.
      
      - Updated the sha1h testcases on arm to check for additional
      cases with custom vector lane selection.
      
      The intrinsic functions for the sha1 patterns have also been
      simplified which seems to eliminate extra vmovs like:
      - vmov.i32 q8, #0.
      
      
      2019-07-18  Sylvia Taylor  <sylvia.taylor@arm.com>
      
              PR target/90317
              * config/arm/arm_neon.h
              (vsha1h_u32): Refactor.
              (vsha1cq_u32): Likewise.
              (vsha1pq_u32): Likewise.
              (vsha1mq_u32): Likewise.
              * config/arm/crypto.md:
              (crypto_sha1h): Remove zero extend, correct vec select.
              (crypto_sha1c): Correct vec select.
              (crypto_sha1m): Likewise.
              (crypto_sha1p): Likewise.
      
              * gcc.target/arm/crypto-vsha1cq_u32.c (foo): Change return type to
              uint32_t.
              (GET_LANE, TEST_SHA1C_VEC_SELECT): New.
              * gcc.target/arm/crypto-vsha1h_u32.c (foo): Change return type to
              uint32_t.
              (GET_LANE, TEST_SHA1H_VEC_SELECT): New.
              * gcc.target/arm/crypto-vsha1mq_u32.c (foo): Change return type to
              uint32_t.
              (GET_LANE, TEST_SHA1M_VEC_SELECT): New.
              * gcc.target/arm/crypto-vsha1pq_u32.c (foo): Change return type to
              uint32_t.
              (GET_LANE, TEST_SHA1P_VEC_SELECT): New.
      
      From-SVN: r273574
      Sylvia Taylor committed
    • demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h. · 979526c9
      include/
      	* demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h.
      	(rust_demangle_sym): Move to libiberty/rust-demangle.h.
      libiberty/
      	* cplus-dem.c: Include rust-demangle.h.
      	* rust-demangle.c: Include rust-demangle.h.
      	* rust-demangle.h: New file.
      
      From-SVN: r273573
      Eduard-Mihai Burtescu committed
    • [arm] Fix incorrect modes with 'borrow' operations · 24990170
      Looking through the arm backend I noticed that the modes used to pass
      comparison types into subtract-with-carry operations were being
      incorrectly set.  The result is that the compiler is not truly
      self-consistent.  To clean this up I've introduced a new predicate,
      arm_borrow_operation (borrowed from the AArch64 backend) which can
      match the comparison type with the required mode and then fixed all
      the patterns to use this.  The split patterns that were generating
      incorrect modes have all obviously been fixed as well.
      
      The basic rule for the use of a borrow is:
      - if the condition code was set by a 'subtract-like' operation (subs, cmp),
        then use CCmode and LTU.
      - if the condition code was by unsigned overflow of addition (adds), then
        use CC_Cmode and GEU.
      
      	* config/arm/predicates.md (arm_borrow_operation): New predicate.
      	* config/arm/arm.c (subdi3_compare1): Use CCmode for the split.
      	(arm_subdi3, subdi_di_zesidi, subdi_di_sesidi): Likewise.
      	(subdi_zesidi_zesidi): Likewise.
      	(negdi2_compare, negdi2_insn): Likewise.
      	(negdi_extensidi): Likewise.
      	(negdi_zero_extendsidi): Likewise.
      	(arm_cmpdi_insn): Likewise.
      	(subsi3_carryin): Use arm_borrow_operation.
      	(subsi3_carryin_const): Likewise.
      	(subsi3_carryin_const0): Likewise.
      	(subsi3_carryin_compare): Likewise.
      	(subsi3_carryin_compare_const): Likewise.
      	(subsi3_carryin_compare_const0): Likewise.
      	(subsi3_carryin_shift): Likewise.
      	(rsbsi3_carryin_shift): Likewise.
      	(negsi2_carryin_compare): Likewise.
      
      From-SVN: r273572
      Richard Earnshaw committed
    • lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR… · b01659aa
      lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR conflicts of types in anonymous namespaces.
      
      	* lto-common.c (gimple_register_canonical_type_1): Do not look for
      	non-ODR conflicts of types in anonymous namespaces.
      	(unify_scc): Do not merge anonymous namespace types.
      	* g++.dg/lto/alias-5_0.C: New testcase.
      	* g++.dg/lto/alias-5_1.C: New.
      	* g++.dg/lto/alias-5_2.c: New.
      
      From-SVN: r273571
      Jan Hubicka committed
    • re PR tree-optimization/91137 (Wrong code with -O3) · 3796e3b3
              PR tree-optimization/91137
              * tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
              (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
              Init, use and fini the above new field.
              (determine_base_object_1): New function.
              (determine_base_object): Reimplement using walk_tree.
      
      gcc/testsuite
              PR tree-optimization/91137
              * gcc.c-torture/execute/pr91137.c: New test.
      
      From-SVN: r273570
      Bin Cheng committed
    • Make ifcvt clean up dead comparisons · f1f10541
      This change is needed to avoid a regression in gcc.dg/ifcvt-3.c
      for a later patch.  Without it, we enter CSE with a dead comparison left
      by if-conversion and then eliminate the second (live) comparison in
      favour of the dead one.  That's functionally correct in itself, but it
      meant that we'd combine the subtraction and comparison into a SUBS
      before we have a chance to fold away the subtraction.
      
      2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* basic-block.h (CLEANUP_FORCE_FAST_DCE): New macro.
      	* cfgcleanup.c (cleanup_cfg): Call run_fast_dce if
      	CLEANUP_FORCE_FAST_DCE is set.
      	* ifcvt.c (rest_of_handle_if_conversion): Pass
      	CLEANUP_FORCE_FAST_DCE to the final cleanup_cfg call if
      	if-conversion succeeded.
      
      From-SVN: r273569
      Richard Sandiford committed
    • Fix -Wreturn-type for static naked functions in C · d119bf79
      This patch extends the fix for PR53633 to include static functions,
      which were giving a bogus -Wreturn-type warning for C but not for C++.
      
      2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/c/
      	PR c/53633
      	* c-decl.c (finish_function): Check targetm.warn_func_return
      	before issuing a -Wreturn-type warning.
      
      gcc/testsuite/
      	* c-c++-common/pr53633-2.c: New test.
      
      From-SVN: r273568
      Richard Sandiford committed
    • tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor branches to make code less indented. · d1f2e4c1
      2019-07-18  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor
      	branches to make code less indented.
      
      From-SVN: r273567
      Richard Biener committed