1. 02 Oct, 2019 37 commits
    • runtime: mark go-context.S as no-executable-stack and split-stack supported · b7c41230
          
          The .note.GNU-stack section tells the linker that this object does not
          require an executable stack.
          
          The .note.GNU-split-stack section tells the linker that functions in
          this object can be called directly by split-stack functions, without
          require a large stack.
          
          The .note.GNU-no-split-stack section tells the linker that functions
          in this object do not have a split-stack prologue.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/198440
      
      From-SVN: r276488
      Ian Lance Taylor committed
    • Improve C++ fold caching efficiency. · b830c28b
      While looking at concepts caching I noticed that we were clearing the caches
      unnecessarily for non-constant initialization, which shouldn't affect
      folding.
      
      	* typeck2.c (store_init_value): Only clear_cv_and_fold_caches if the
      	value is constant.
      
      From-SVN: r276487
      Jason Merrill committed
    • Add some hash_map_safe_* functions like vec_safe_*. · c89844e5
      gcc/
      	* hash-map.h (default_hash_map_size): New variable.
      	(create_ggc): Use it as default argument.
      	(hash_map_maybe_create, hash_map_safe_get)
      	(hash_map_safe_get_or_insert, hash_map_safe_put): New fns.
      gcc/cp/
      	* constexpr.c (maybe_initialize_fundef_copies_table): Remove.
      	(get_fundef_copy): Use hash_map_safe_get_or_insert.
      	* cp-objcp-common.c (cp_get_debug_type): Use hash_map_safe_*.
      	* decl.c (store_decomp_type): Remove.
      	(cp_finish_decomp): Use hash_map_safe_put.
      	* init.c (get_nsdmi): Use hash_map_safe_*.
      	* pt.c (store_defaulted_ttp, lookup_defaulted_ttp): Remove.
      	(add_defaults_to_ttp): Use hash_map_safe_*.
      
      From-SVN: r276484
      Jason Merrill committed
    • Testsuite, remove alloca header · d61bff85
      2019-10-02  Andreas Tobler  <andreast@gcc.gnu.org>
      
      	* testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h
      	include. Replace alloca () with __builtin_alloca ().
      	* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise.
      
      Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
      
      From-SVN: r276479
      Andreas Tobler committed
    • re PR fortran/91784 (ICE in gfc_real2complex, at fortran/arith.c:2208) · c20a90e0
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91784
      	* simplify.c (gfc_convert_constant): Simplify expression if the
      	expres	ion type is EXPR_OP.
      
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91784
      	* gfortran.dg/pr91784.f90: New test.
      
      From-SVN: r276474
      Steven G. Kargl committed
    • re PR fortran/91785 (ICE in check_assumed_size_reference, at fortran/resolve.c:1601) · 307de100
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91785
      	* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
      	it locus set.
      
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91785
      	* gfortran.dg/pr91785.f90: New test.
      
      From-SVN: r276473
      Steven G. Kargl committed
    • re PR fortran/91942 (ICE in match_vtag, at fortran/io.c:1485) · 939e9f69
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91942
      	* io.c (match_vtag): Check for non-NULL result->symtree.
      	(match_out_tag): Check for invalid constant due to inquiry parameter.
      	(match_filepos): Instead of a syntax error, go to cleanup to get better
      	error messages.
      
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91942
      	* gfortran.dg/pr91587.f90: Update dg-error regex.
      	* gfortran.dg/pr91942.f90: New test.
      
      From-SVN: r276472
      Steven G. Kargl committed
    • re PR fortran/91943 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370) · 8b4e5e71
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91943
      	* match.c (gfc_match_call): BOZ cannot be an actual argument in
      	a subroutine reference.
      	* resolve.c (resolve_function): BOZ cannot be an actual argument in
      	a function reference.
       
      2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/91943
      	gfortran.dg/pr91943.f90
      
      From-SVN: r276471
      Steven G. Kargl committed
    • cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New. · b1fb82e5
      
      	* cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT,
      	MAX_INLINE_INSNS_AUTO_O2_LIMIT): New.
      	* ipa-inline.c (inline_insns_single, inline_insns_auto): New functions.
      	(can_inline_edge_by_limits_p): Use it.
      	(big_speedup_p): Use PARAM_INLINE_MIN_SPEEDUP_O2.
      	(want_inline_small_function_p): Use O2 bounds.
      	(edge_badness): LIkewise.
      	* opts.c (default_options): Add OPT_finline_functions.
      	* params.def (PARAM_INLINE_MIN_SPEEDUP_O2,
      	PARAM_MAX_INLINE_INSNS_SINGLE_O2, PARAM_MAX_INLINE_INSNS_AUTO_O2):
      	New parameters.
      
      	* g++.dg/tree-ssa/pr53844.C: Add -fno-inline-functions --param
      	max-inline-insns-single-O2=200.
      	* gcc.c-torture/execute/builtins/builtins.exp: Add
      	-fno-inline-functions to additional_flags.
      	* gcc.dg/ipa/inline-7.c: Add -fno-inline-functions.
      	* gcc.dg/optimize-bswapsi-5.c: Add -fno-inline-functions.
      	* gcc.dg/tree-ssa/ssa-thread-12.c: Add --param
      	early-inlining-insns-O2=14 -fno-inline-functions; revert previous
      	change.
      	* gcc.dg/winline-3.c: Use --param max-inline-insns-single-O2=1
      	--param inline-min-speedup-O2=100
      	instead of --param max-inline-insns-single=1 --param
      	inline-min-speedup=100
      
      	* invoke.texi (-finline-functions): Update documentation.
      	(max-inline-insns-single-O2, max-inline-insns-auto-O2,
      	inline-min-speedup-O2): Document.
      	(early-inlining-insns-O2): Simplify docs.
      
      From-SVN: r276470
      Jan Hubicka committed
    • cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New. · 562d1e95
      
      	* cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT,
      	MAX_INLINE_INSNS_AUTO_O2_LIMIT): New.
      	* ipa-inline.c (inline_insns_single, inline_insns_auto): New functions.
      	(can_inline_edge_by_limits_p): Use it.
      	(big_speedup_p): Use PARAM_INLINE_MIN_SPEEDUP_O2.
      	(want_inline_small_function_p): Use O2 bounds.
      	(edge_badness): LIkewise.
      	* opts.c (default_options): Add OPT_finline_functions.
      	* params.def (PARAM_INLINE_MIN_SPEEDUP_O2,
      	PARAM_MAX_INLINE_INSNS_SINGLE_O2, PARAM_MAX_INLINE_INSNS_AUTO_O2):
      	New parameters.
      
      	* g++.dg/tree-ssa/pr53844.C: Add -fno-inline-functions --param
      	max-inline-insns-single-O2=200.
      	* gcc.c-torture/execute/builtins/builtins.exp: Add
      	-fno-inline-functions to additional_flags.
      	* gcc.dg/ipa/inline-7.c: Add -fno-inline-functions.
      	* gcc.dg/optimize-bswapsi-5.c: Add -fno-inline-functions.
      	* gcc.dg/tree-ssa/ssa-thread-12.c: Add --param
      	early-inlining-insns-O2=14 -fno-inline-functions; revert previous
      	change.
      	* gcc.dg/winline-3.c: Use --param max-inline-insns-single-O2=1
      	--param inline-min-speedup-O2=100
      	instead of --param max-inline-insns-single=1 --param
      	inline-min-speedup=100
      
      	* invoke.texi (-finline-functions): Update documentation.
      	(max-inline-insns-single-O2, max-inline-insns-auto-O2,
      	inline-min-speedup-O2): Document.
      	(early-inlining-insns-O2): Simplify docs.
      
      From-SVN: r276469
      Jan Hubicka committed
    • Remove greedy wildcards from libstdc++ linker script · 352d2690
      The only symbols matched by std::e[a-q]* and std::e[s-z]* that are
      supposed to be in the GLIBCXX_3.4 version are std::exception::* and
      std::endl and std::ends. The latter two already have explicit patterns
      matching them, so we just need to match std::exception::*.
      
      This change ensures that any new symbols with a return type of
      std::enable_if<...> are not added to the GLIBCXX_3.4 version.
      
      	* config/abi/pre/gnu.ver: Tighten up greedy wildcards.
      
      From-SVN: r276468
      Jonathan Wakely committed
    • ifcvt: improve cost estimation (PR 87047) · 1764d63b
      	PR rtl-optimization/87047
      	* ifcvt.c (average_cost): New static function.  Use it...
      	(noce_process_if_block): ... here.
      
      testsuite/
      	* gcc.dg/pr87047.c: New test.
      
      From-SVN: r276466
      Alexander Monakov committed
    • [PR testsuite/91842] Skip gcc.dg/ipa/ipa-sra-19.c on power · a264ea9a
      2019-10-02  Martin Jambor  <mjambor@suse.cz>
      
      	PR testsuite/91842
      	* gcc.dg/ipa/ipa-sra-19.c: Skip on powerpc.
      
      From-SVN: r276465
      Martin Jambor committed
    • module.c (load_commons): Initialize flags to 0 to silecne -Wmaybe-uninitialized warning. · 408b33fc
      
      	* module.c (load_commons): Initialize flags to 0 to silecne
      	-Wmaybe-uninitialized warning.
      	(read_module): Likewise for n and comp_name.
      
      From-SVN: r276464
      Jan Hubicka committed
    • Document non-conformance of parallel mode to recent C++ standards · 709310e7
      	* doc/xml/manual/parallel_mode.xml: Add caveat about support for
      	recent standards.
      	* doc/html/*: Regenerate.
      
      From-SVN: r276463
      Jonathan Wakely committed
    • rs6000-protos.h (expand_block_move): Change prototype. · c8241327
      2019-10-02  Aaron Sawdey <acsawdey@linux.ibm.com>
      
      	* config/rs6000/rs6000-protos.h (expand_block_move): Change prototype.
      	* config/rs6000/rs6000-string.c (expand_block_move): Add
      	might_overlap parm.
      	* config/rs6000/rs6000.md (movmemsi): Add new pattern.
      	(cpymemsi): Add might_overlap parm to expand_block_move() call.
      
      From-SVN: r276462
      Aaron Sawdey committed
    • builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm. · 03a9b90a
      2019-10-02  Aaron Sawdey <acsawdey@linux.ibm.com>
      
      	* builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm.
      	(expand_builtin_memcpy): Use might_overlap parm.
      	(expand_builtin_mempcpy_args): Use might_overlap parm.
      	(expand_builtin_memmove): Call expand_builtin_memory_copy_args.
      	(expand_builtin_memory_copy_args): Add might_overlap parm.
      	* expr.c (emit_block_move_via_cpymem): Rename to
      	emit_block_move_via_pattern, add might_overlap parm, use cpymem
      	or movmem optab as appropriate.
      	(emit_block_move_hints): Add might_overlap parm, do the right
      	thing for might_overlap==true.
      	* expr.h (emit_block_move_hints): Update prototype.
      
      From-SVN: r276461
      Aaron Sawdey committed
    • tree-eh.h (unsplit_eh_edges): Declare. · 629387a6
      	* tree-eh.h (unsplit_eh_edges): Declare.
      	* tree-eh.c (maybe_remove_unreachable_handlers): Detect more cases.
      	(unsplit_eh_edges): New function wrapping unsplit_all_eh.
      	* gimple-ssa-store-merging.c: Include cfganal.h cfgcleanup.h except.h.
      	(struct store_immediate_info): Add lp_nr field.
      	(store_immediate_info::store_immediate_info): Add NR2 parameter and
      	initialize lp_nr with it.
      	(struct merged_store_group): Add lp_nr and only_constants fields.
      	(merged_store_group::merged_store_group): Initialize them.
      	(merged_store_group::can_be_merged_into): Deal with them.
      	(pass_store_merging): Rename terminate_and_release_chain into
      	terminate_and_process_chain.
      	(pass_store_merging::terminate_and_process_all_chains): Adjust to above
      	renaming and remove useless assertions.
      	(pass_store_merging::terminate_all_aliasing_chains): Small tweak.
      	(stmts_may_clobber_ref_p): Be prepared for different basic blocks.
      	(imm_store_chain_info::coalesce_immediate_stores): Use only_constants
      	instead of always recomputing it and compare lp_nr.
      	(imm_store_chain_info::output_merged_store): If the group is in an
      	active EH region, register new stores if they can throw.  Moreover,
      	if the insertion has created new basic blocks, adjust the PHI nodes
      	of the post landing pad.
      	(imm_store_chain_info::output_merged_stores): If the original stores
      	are in an active EH region, deregister them.
      	(lhs_valid_for_store_merging_p): Prettify.
      	(adjust_bit_pos): New function extracted from...
      	(mem_valid_for_store_merging): ...here.  Use it for the base address
      	and also for the offset if it is the addition of a constant.
      	(lp_nr_for_store): New function.
      	(pass_store_merging::process_store): Change return type to bool.
      	Call lp_nr_for_store to initialize the store info.  Propagate the
      	return status of various called functions to the return value.
      	(store_valid_for_store_merging_p): New predicate.
      	(enum basic_block_status): New enumeration.
      	(get_status_for_store_merging): New function.
      	(pass_store_merging::execute): If the function can throw and catch
      	non-call exceptions, unsplit the EH edges on entry and clean up the
      	CFG on exit if something changed.  Call get_status_for_store_merging
      	for every basic block and keep the chains open across basic blocks
      	when possible.  Terminate and process open chains at the end, if any.
      
      From-SVN: r276459
      Eric Botcazou committed
    • Fix shadowing in globalize_reg · ea4b29d5
      2019-10-02  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* reginfo.c (globalize_reg): Fix shadowed variable in
      	function_abis walk.
      
      From-SVN: r276457
      Richard Sandiford committed
    • Fix MIPS call-clobbered-*.c tests · 4bdb8c3d
      Jeff pointed out that gcc.target/mips/call-clobbered-4.c started
      failing after the function-abi series.  This is because IRA used
      to treat partly call-clobbered registers as hard conflicts and
      so wouldn't consider them for -fcaller-saves.  Now that we treat
      call clobbers the same way regardless of where they come from,
      we can use $f21 as a caller-save register.  This in turn means
      that -Os is no longer a special case in call-clobbered-3.c.
      
      (The new code is the same size as the old code.)
      
      2019-10-02  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/testsuite/
      	* gcc.target/mips/call-clobbered-3.c: Remove skip for -Os.
      	* gcc.target/mips/call-clobbered-4.c: Delete.
      
      From-SVN: r276456
      Richard Sandiford committed
    • [PATCH] Do not check call type compatibility when cloning cgraph-edges · 3187c8a5
      2019-10-02  Martin Jambor  <mjambor@suse.cz>
      
      	* cgraph.c (symbol_table::create_edge): New parameter cloning_p,
      	do not compute some stuff when set.
      	(cgraph_node::create_edge): Likewise.
      	(cgraph_node::create_indirect_edge): Renamed last parameter to
      	coning_p and flipped its meaning, don't even calculate
      	inline_failed when set.
      	* cgraph.h (cgraph_node::create_edge): Add new parameter.
      	(symbol_table::::create_edge): Likewise.
      	(cgraph_node::create_indirect_edge): Rename last parameter, flip
      	the default value.
      	* cgraphclones.c (cgraph_edge::clone): Pass true cloning_p to all
      	call graph edge creating functions.
      
      From-SVN: r276455
      Martin Jambor committed
    • re PR c++/91222 (507.cactuBSSN_r build fails in warn_types_mismatch at… · 569651fd
      re PR c++/91222 (507.cactuBSSN_r build fails in warn_types_mismatch at ipa-devirt.c:1006 since r273571)
      
      	PR c++/91222
      	* ipa-devirt.c (warn_types_mismatch): Fix conditional on anonymous
      	namespace types.
      
      From-SVN: r276454
      Jan Hubicka committed
    • [ARC] Pass along "-mcode-density" flag to "as" · d94b1602
      This change makes sure that if the driver is invoked with
      "-mcode-density" flag, then the assembler will receive it
      too.
      
      gcc/
      xxxx-xx-xx  Shahab Vahedi  <shahab@synopsys.com>
      
              * config/arc/arc.h (ASM_SPEC): pass -mcode-density
      
      From-SVN: r276453
      Shahab Vahedi committed
    • tree-vectorizer.h (vect_transform_reduction): Declare. · 9f4d9a36
      2019-10-02  Richard Biener  <rguenther@suse.de>
      
      	* tree-vectorizer.h (vect_transform_reduction): Declare.
      	* tree-vect-stmts.c (vect_transform_stmt): Use it.
      	* tree-vect-loop.c (vectorizable_reduction): Split out reduction
      	stmt transform to ...
      	(vect_transform_reduction): ... this.
      
      From-SVN: r276452
      Richard Biener committed
    • Support OpenMP's use_device_addr in Fortran · ef4add8e
              gcc/fortran/
      	* dump-parse-tree.c (show_omp_clauses): Handle OMP_LIST_USE_DEVICE_ADDR.
      	* gfortran.h (enum): Add OMP_LIST_USE_DEVICE_ADDR.
      	* openmp.c (omp_mask1): Likewise.
      	(gfc_match_omp_clauses): Match 'use_device_addr'.
      	(OMP_TARGET_DATA_CLAUSES): Add OMP_LIST_USE_DEVICE_ADDR.
      	(resolve_omp_clauses): Add it; add is_device_ptr checks.
      
              gcc/testsuite/
      	* gfortran.dg/gomp/is_device_ptr-1.f90: New.
      
      From-SVN: r276449
      Tobias Burnus committed
    • re PR c++/91606 (Optimization leads to invalid code) · fc1a202c
      2019-10-02  Richard Biener  <rguenther@suse.de>
      
      	PR c++/91606
      	* decl.c (build_ptrmemfunc_type): Mark pointer-to-member
      	fat pointer structure members as DECL_NONADDRESSABLE_P.
      
      	* g++.dg/torture/pr91606.C: New testcase.
      
      From-SVN: r276448
      Richard Biener committed
    • Improve OMP/ACC error diagnostic in Fortran · ba045eb2
      	gcc/fortran/
      	* openmp.c (gfc_match_omp_clauses): Show a clause-parsing
      	error if none was rised before.
      	* parse.c (matcha, matcho): If error occurred after
      	OpenMP/OpenACC directive matched, do not try other directives.
      
      	gcc/testsuite/
      	* gfortran.dg/goacc/asyncwait-1.f95: Handle new error message.
      	* gfortran.dg/goacc/asyncwait-2.f95: Likewise
      	* gfortran.dg/goacc/asyncwait-3.f95: Likewise
      	* gfortran.dg/goacc/asyncwait-4.f95: Likewise
      	* gfortran.dg/goacc/default-2.f: Likewise
      	* gfortran.dg/goacc/enter-exit-data.f95: Likewise
      	* gfortran.dg/goacc/if.f95: Likewise
      	* gfortran.dg/goacc/list.f95: Likewise
      	* gfortran.dg/goacc/literal.f95: Likewise
      	* gfortran.dg/goacc/loop-2-kernels-tile.f: Likewise95
      	* gfortran.dg/goacc/loop-2-parallel-tile.f95: Likewise
      	* gfortran.dg/goacc/loop-7.f95: Likewise
      	* gfortran.dg/goacc/parallel-kernels-cla: Likewiseuses.f95
      	* gfortran.dg/goacc/routine-6.f90: Likewise
      	* gfortran.dg/goacc/several-directives.f95: Likewise
      	* gfortran.dg/goacc/sie.f95: Likewise
      	* gfortran.dg/goacc/tile-1.f90: Likewise
      	* gfortran.dg/goacc/update-if_present-2.: Likewisef90
      	* gfortran.dg/gomp/declare-simd-1.f90: Likewise
      	* gfortran.dg/gomp/pr29759.f90: Likewise
      
      From-SVN: r276447
      Tobias Burnus committed
    • Fix coding style comment, missed in last commit · 4aef4667
              * trans-openmp.c (gfc_omp_is_optional_argument): Fix coding
              style.
      
      From-SVN: r276446
      Tobias Burnus committed
    • Fix omp target issue with Fortran optional arguments · 67c25950
              gcc/
              * omp-low.c (lower_omp_target): Dereference optional argument
              to work with the right pointer.
      
              gcc/testsuite/
              * libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: New.
      
      From-SVN: r276445
      Tobias Burnus committed
    • f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to gfc_omp_is_optional_argument. · 73a28634
      2019-10-02  Kwok Cheung Yeung  <kcy@codesourcery.com>
      
              gcc/fortran/
              * f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to
              gfc_omp_is_optional_argument.
              * trans-decl.c (create_function_arglist): Set
              GFC_DECL_OPTIONAL_ARGUMENT in the generated decl if the parameter is
              optional.
              * trans-openmp.c (gfc_omp_is_optional_argument): New.
              (gfc_omp_privatize_by_reference): Return true if the decl is an
              optional pass-by-reference argument.
              * trans.h (gfc_omp_is_optional_argument): New declaration.
              (lang_decl): Add new optional_arg field.
              (GFC_DECL_OPTIONAL_ARGUMENT): New macro.
      
              gcc/
              * langhooks-def.h (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Default to
              false.
              (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT.
              * langhooks.h (omp_is_optional_argument): New hook.
              * omp-general.c (omp_is_optional_argument): New.
              * omp-general.h (omp_is_optional_argument): New declaration.
              * omp-low.c (lower_omp_target): Create temporary for received value
              and take the address for new_var if the original variable was a
              DECL_BY_REFERENCE.  Use size of referenced object when a
              pass-by-reference optional argument used as argument to firstprivate.
      
      From-SVN: r276444
      Kwok Cheung Yeung committed
    • internal.h (enum include_type): Remove trailing comma. · 68710ac7
      2019-10-02  Richard Biener  <rguenther@suse.de>
      
      	* internal.h (enum include_type): Remove trailing comma.
      
      From-SVN: r276443
      Richard Biener committed
    • re PR tree-optimization/91940 (__builtin_bswap16 loop optimization) · 9ff9a0a5
      	PR tree-optimization/91940
      	* tree-vect-patterns.c: Include tree-vector-builder.h and
      	vec-perm-indices.h.
      	(vect_recog_rotate_pattern): Also handle __builtin_bswap16, either by
      	unpromoting the argument back to uint16_t, or by converting into a
      	rotate, or into shifts plus ior.
      
      	* gcc.dg/vect/vect-bswap16.c: Add -msse4 on x86, run on all targets,
      	expect vectorized 1 loops message on both vect_bswap and sse4_runtime
      	targets.
      	* gcc.dg/vect/vect-bswap16a.c: New test.
      
      From-SVN: r276442
      Jakub Jelinek committed
    • tree-vectorizer.h (stmt_vec_info_type::cycle_phi_info_type): New. · 291fa23a
      2019-10-02  Richard Biener  <rguenther@suse.de>
      
      	* tree-vectorizer.h (stmt_vec_info_type::cycle_phi_info_type):
      	New.
      	(vect_transform_cycle_phi): Declare.
      	* tree-vect-stmts.c (vect_transform_stmt): Call
      	vect_transform_cycle_phi.
      	* tree-vect-loop.c (vectorizable_reduction): Split out
      	PHI transformation stage to ...
      	(vect_transform_cycle_phi): ... here.
      
      From-SVN: r276441
      Richard Biener committed
    • [LRA] Don't make eliminable registers live (PR91957) · 1bcb4c4f
      One effect of https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00802.html
      was to strengthen the sanity check in lra_assigns so that it checks
      whether reg_renumber is consistent with the whole conflict set.
      This duly tripped on csky for a pseudo that had been allocated
      to the eliminated frame pointer.  (csky doesn't have a separate
      hard frame pointer.)
      
      lra-lives uses:
      
      /* Set of hard regs (except eliminable ones) currently live.  */
      static HARD_REG_SET hard_regs_live;
      
      to track the set of live directly-referenced hard registers, and it
      correctly implements the exclusion when setting up the initial set:
      
        hard_regs_live &= ~eliminable_regset;
      
      But later calls to make_hard_regno_live and make_hard_regno_dead
      would process eliminable registers like other registers, recording
      conflicts for them and potentially making them live.  (Note that
      after r266086, make_hard_regno_dead adds conflicts for registers
      that are already marked dead.)  I think this would have had the
      effect of pessimising targets without a separate hard frame pointer.
      
      2019-10-02  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR middle-end/91957
      	* lra-lives.c (make_hard_regno_dead): Don't record conflicts for
      	eliminable registers.
      	(make_hard_regno_live): Likewise, and don't make them live.
      
      From-SVN: r276440
      Richard Sandiford committed
    • re PR libfortran/91593 (Implicit enum conversions in libgfortran/io/transfer.c) · a4626a7b
      2019-10-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
      	PR libfortran/91593
      	* io/read.c (read_decimal): Cast constant to size_t to turn off
      	a bogus warning.
      	* io/write.c (btoa_big): Use memset in lieu of setting the null
      	byte in a string buffer to turn off a bogus warning.
      
      From-SVN: r276439
      Jerry DeLisle committed
    • Daily bump. · 8dc7a6f2
      From-SVN: r276438
      GCC Administrator committed
    • Handle :: tokens in C for C2x. · 93313b94
      As part of adding [[]]-style attributes, C2x adds the token :: for use
      in scoped attribute names.
      
      This patch adds corresponding support for that token in C to GCC.  The
      token is supported both for C2x and for older gnu* standards (on the
      basis that extensions are normally supported in older gnu* versions;
      people will expect to be able to use [[]] attributes, before C2x is
      the default, without needing to use -std=gnu2x).
      
      There are no cases in older C standards where the token : can be
      followed by a token starting with : in syntactically valid sources;
      the only cases the :: token could break in older standard C thus are
      ones involving concatenation of pp-tokens where the result does not
      end up as tokens (e.g., gets stringized).  In GNU C extensions, the
      main case where :: might appear in existing sources is in asm
      statements, and the C parser is thus made to handle it like two
      consecutive : tokens, which the C++ parser already does.  A limited
      test of various positionings of :: in asm statements is added to the
      testsuite (in particular, to cover the syntax error when :: means too
      many colons but a single : would be OK), but existing tests cover a
      variety of styles there anyway.
      
      Technically there are cases in Objective-C and OpenMP for which this
      also changes how previously valid code is lexed: the objc-selector-arg
      syntax allows multiple consecutive : tokens (although I don't think
      they are particularly useful there), while OpenMP syntax includes
      array section syntax such as [:] which, before :: was a token, could
      also be written as [::> (there might be other OpenMP cases potentially
      affected, I didn't check all the OpenMP syntax in detail).  I don't
      think either of those cases affects the basis for supporting the ::
      token in all -std=gnu* modes, or that there is any obvious need to
      special-case handling of CPP_SCOPE tokens for those constructs the way
      there is for asm statements.
      
      cpp_avoid_paste, which determines when spaces need adding between
      tokens in preprocessed output where there wouldn't otherwise be
      whitespace between them (e.g. if stringized), already inserts space
      between : and : unconditionally, rather than only for C++, so no
      change is needed there (but a C2x test is added that such space is
      indeed inserted).
      
      Bootstrapped with no regressions on x86-64-pc-linux-gnu.
      
      gcc/c:
      	* c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
      	CPP_COLON tokens.
      
      gcc/testsuite:
      	* gcc.dg/asm-scope-1.c, gcc.dg/cpp/c11-scope-1.c,
      	gcc.dg/cpp/c17-scope-1.c, gcc.dg/cpp/c2x-scope-1.c,
      	gcc.dg/cpp/c2x-scope-2.c, gcc.dg/cpp/c90-scope-1.c,
      	gcc.dg/cpp/c94-scope-1.c, gcc.dg/cpp/c99-scope-1.c,
      	gcc.dg/cpp/gnu11-scope-1.c, gcc.dg/cpp/gnu17-scope-1.c,
      	gcc.dg/cpp/gnu89-scope-1.c, gcc.dg/cpp/gnu99-scope-1.c: New tests.
      
      libcpp:
      	* include/cpplib.h (struct cpp_options): Add member scope.
      	* init.c (struct lang_flags, lang_defaults): Likewise.
      	(cpp_set_lang): Set scope member of pfile.
      	* lex.c (_cpp_lex_direct): Test CPP_OPTION (pfile, scope) not
      	CPP_OPTION (pfile, cplusplus) for creating CPP_SCOPE tokens.
      
      From-SVN: r276434
      Joseph Myers committed
  2. 01 Oct, 2019 3 commits
    • Support prefixes in diagnostic_show_locus · e9c9a142
      Previously, diagnostic_show_locus saved and restored the pretty_printer's
      prefix, clearing it for the duration of the call.
      
      I have a patch kit in development that can benefit from applying a prefix
      to the output of d_s_l, so this patch adds support to d_s_l for printing
      such prefixes.
      
      It moves the save and restore of the pp's prefix from d_s_l to all of its
      callers, and updates diagnostic-show-locus.c to properly handle prefixes.
      
      gcc/c-family/ChangeLog:
      	* c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
      	calling diagnostic_show_locus, rather than destroying it afterwards.
      
      gcc/ChangeLog:
      	* diagnostic-show-locus.c (layout::print_gap_in_line_numbering):
      	Call pp_emit_prefix.
      	(layout::print_source_line): Likewise.
      	(layout::start_annotation_line): Likewise.
      	(diagnostic_show_locus): Remove call to temporarily clear the
      	prefix.
      	(selftest::test_one_liner_fixit_remove): Add test coverage for the
      	interaction of pp_set_prefix with rulers and fix-it hints.
      	* diagnostic.c (default_diagnostic_finalizer): Temporarily clear
      	prefix when calling diagnostic_show_locus, rather than destroying
      	it afterwards.
      	(print_parseable_fixits): Temporarily clear prefix.
      	* pretty-print.c (pp_format): Save and restore line_length, rather
      	than assuming it is zero.
      	(pp_output_formatted_text): Remove assertion that line_length is
      	zero.
      
      gcc/fortran/ChangeLog:
      	* error.c (gfc_diagnostic_starter): Clear the prefix before
      	calling diagnostic_show_locus.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/plugin/diagnostic_group_plugin.c (test_begin_group_cb):
      	Clear the prefix before emitting the "END GROUP" line.
      	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
      	(custom_diagnostic_finalizer): Temporarily clear prefix when
      	calling diagnostic_show_locus, rather than destroying it
      	afterwards.
      
      From-SVN: r276433
      David Malcolm committed
    • Make some new algorithms work in parallel mode · a16bc2f3
      	* include/experimental/algorithm (experimental::sample): Qualify call
      	to __sample correctly.
      	* include/parallel/algo.h (sample, for_each_n): Add using-declarations
      	for algorithms that don't have parallel implementations.
      
      From-SVN: r276432
      Jonathan Wakely committed
    • Make some parallel mode algorithms usable in constexpr contexts · e12097ed
      This makes the __parallel::equal and __parallel:lexicographical_compare
      algorithms usable in constant expressions, by dispatching to the
      sequential algorithm when calling during constant evaluation.
      
      	* include/parallel/algobase.h (equal, lexicographical_compare): Add
      	_GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
      	constant evaluated.
      	* include/parallel/algorithmfwd.h (equal, lexicographical_compare):
      	Add _GLIBCXX20_CONSTEXPR.
      
      From-SVN: r276431
      Jonathan Wakely committed