1. 08 Jan, 2020 27 commits
    • Remove constexpr support for DECL_BY_REFERENCE. · cd3ca6cb
      Since we switched to doing constexpr evaluation on pre-GENERIC trees,
      we don't have to handle DECL_BY_REFERENCE.
      
      	* constexpr.c (cxx_eval_call_expression): Remove DECL_BY_REFERENCE
      	support.
      
      From-SVN: r280017
      Jason Merrill committed
    • * gcc.dg/Wstringop-overflow-27.c: Make testnames unique. · 5b18be0b
      From-SVN: r280016
      Jeff Law committed
    • hash-map-tests.c: fix memory leak · 51f90235
      This commit makes "make selftest-valgrind" clean by fixing this leak:
      
      4 bytes in 1 blocks are definitely lost in loss record 1 of 734
         at 0x483AB1A: calloc (vg_replace_malloc.c:762)
         by 0x261DBE0: xcalloc (xmalloc.c:162)
         by 0x2538C46: selftest::test_map_of_strings_to_int() (hash-map-tests.c:87)
         by 0x253ABD2: selftest::hash_map_tests_c_tests() (hash-map-tests.c:307)
         by 0x24A885B: selftest::run_tests() (selftest-run-tests.c:65)
         by 0x1373D80: toplev::run_self_tests() (toplev.c:2339)
         by 0x1373FA7: toplev::main(int, char**) (toplev.c:2421)
         by 0x2550EFF: main (main.c:39)
      
      gcc/ChangeLog:
      	* hash-map-tests.c (selftest::test_map_of_strings_to_int): Fix
      	memory leak.
      
      From-SVN: r280015
      David Malcolm committed
    • libstdc++: Fix error handling in filesystem::remove_all (PR93201) · fff148b7
      When recursing into a directory, any errors that occur while removing a
      directory entry are ignored, because the subsequent increment of the
      directory iterator clears the error_code object.
      
      This fixes that bug by checking the result of each recursive operation
      before incrementing. This is a change in observable behaviour, because
      previously other directory entries would still be removed even if one
      (or more) couldn't be removed due to errors. Now the operation stops on
      the first error, which is what the code intended to do all along. The
      standard doesn't specify what happens in this case (because the order
      that the entries are processed is unspecified anyway).
      
      It also improves the error reporting so that the name of the file that
      could not be removed is included in the filesystem_error exception. This
      is done by introducing a new helper type for reporting errors with
      additional context and a new function that uses that type. Then the
      overload of std::filesystem::remove_all that throws an exception can use
      the new function to ensure any exception contains the additional
      information.
      
      For std::experimental::filesystem::remove_all just fix the bug where
      errors are ignored.
      
      	PR libstdc++/93201
      	* src/c++17/fs_ops.cc (do_remove_all): New function implementing more
      	detailed error reporting for remove_all. Check result of recursive
      	call before incrementing iterator.
      	(remove_all(const path&), remove_all(const path&, error_code&)): Use
      	do_remove_all.
      	* src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
      	result of recursive call before incrementing iterator.
      	* testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
      	are reported correctly.
      	* testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
      
      From-SVN: r280014
      Jonathan Wakely committed
    • Add missing { dg-require-effective-target fpic } to aarch64 tests · face749a
      2020-01-08  Joel Brobecker  <brobecker@adacore.com>
                Olivier Hainque  <hainque@adacore.com>
      
      	testsuite/
      	* g++.target/aarch64/sve/tls_2.C: Add missing
      	{ dg-require-effective-target fpic } directive.
      	* gcc.target/aarch64/noplt_2.c: Likewise.
      	* gcc.target/aarch64/noplt_3.c: Likewise.
      	* gcc.target/aarch64/pic-constantpool1.c: Likewise.
      	* gcc.target/aarch64/pic-small.c: Likewise.
      	* gcc.target/aarch64/pic-symrefplus.c: Likewise.
      	* gcc.target/aarch64/pr66912.c: Likewise.
      	* gcc.target/aarch64/sve/tls_1.c: Likewise.
      	* gcc.target/aarch64/sve/tls_preserve_1.c: Likewise.
      	* gcc.target/aarch64/sve/tls_preserve_2.c: Likewise.
      	* gcc.target/aarch64/sve/tls_preserve_3.c: Likewise.
      	* gcc.target/aarch64/tlsie_tiny_1.c: Likewise.
      	* gcc.target/aarch64/tlsle12_1.c: Likewise.
      	* gcc.target/aarch64/tlsle12_tiny_1.c: Likewise.
      	* gcc.target/aarch64/tlsle24_1.c: Likewise.
      	* gcc.target/aarch64/tlsle24_tiny_1.c: Likewise.
      	* gcc.target/aarch64/tlsle32_1.c: Likewise.
      	* gcc.target/aarch64/tlsle_sizeadj_small_1.c: Likewise.
      	* gcc.target/aarch64/tlsle_sizeadj_tiny_1.c: Likewise.
      
      Co-Authored-By: Olivier Hainque <hainque@adacore.com>
      
      From-SVN: r280013
      Joel Brobecker committed
    • re PR target/93187 (ICE in extract_insn, at recog.c:2294) · b41383c8
      	PR target/93187
      	* config/i386/i386.md (*stack_protect_set_2_<mode> peephole2,
      	*stack_protect_set_3 peephole2): Also check that the second
      	insns source is general_operand.
      
      	* g++.dg/opt/pr93187.C: New test.
      
      From-SVN: r280012
      Jakub Jelinek committed
    • re PR target/93174 (ICE building glibc __sha512_process_block for i686) · 7ca803f1
      	PR target/93174
      	* config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand
      	predicate for output operand instead of register_operand.
      	(addcarry<mode>, addcarry<mode>_1): Likewise.  Add alternative with
      	memory destination and non-memory operands[2].
      
      	* gcc.c-torture/compile/pr93174.c: New test.
      
      From-SVN: r280011
      Jakub Jelinek committed
    • relax aarch64 stack-clash tests depedence on alloca.h · 80d803ae
      2020-01-06  Olivier Hainque  <hainque@adacore.com>
      	Alexandre Oliva  <oliva@adacore.com>
      
      	* gcc.target/aarch64/stack-check-alloca.h: Remove
      	#include alloca.h. #define alloca __builtin_alloca
      	instead.
      	* gcc.target/aarch64/stack-check-alloca-1.c: Add
      	{ dg-require-effective-target alloca }.
      	* gcc.target/aarch64/stack-check-alloca-2.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-3.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-4.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-5.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-6.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-7.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-8.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-9.c: Likewise.
      	* gcc.target/aarch64/stack-check-alloca-10.c: Likewise.
      
      Co-Authored-By: Alexandre Oliva <oliva@adacore.com>
      
      From-SVN: r280010
      Olivier Hainque committed
    • Use cgraph_node::dump_{asm_},name where possible. · 3629ff8a
      2020-01-08  Martin Liska  <mliska@suse.cz>
      
      	* cgraph.c (cgraph_node::dump): Use ::dump_name or
      	::dump_asm_name instead of (::name or ::asm_name).
      	* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
      	* cgraphunit.c (walk_polymorphic_call_targets): Likewise.
      	(analyze_functions): Likewise.
      	(expand_all_functions): Likewise.
      	* ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
      	(propagate_bits_across_jump_function): Likewise.
      	(dump_profile_updates): Likewise.
      	(ipcp_store_bits_results): Likewise.
      	(ipcp_store_vr_results): Likewise.
      	* ipa-devirt.c (dump_targets): Likewise.
      	* ipa-fnsummary.c (analyze_function_body): Likewise.
      	* ipa-hsa.c (check_warn_node_versionable): Likewise.
      	(process_hsa_functions): Likewise.
      	* ipa-icf.c (sem_item_optimizer::merge_classes): Likewise.
      	(set_alias_uids): Likewise.
      	* ipa-inline-transform.c (save_inline_function_body): Likewise.
      	* ipa-inline.c (recursive_inlining): Likewise.
      	(inline_to_all_callers_1): Likewise.
      	(ipa_inline): Likewise.
      	* ipa-profile.c (ipa_propagate_frequency_1): Likewise.
      	(ipa_propagate_frequency): Likewise.
      	* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
      	(remove_described_reference): Likewise.
      	* ipa-pure-const.c (worse_state): Likewise.
      	(check_retval_uses): Likewise.
      	(analyze_function): Likewise.
      	(propagate_pure_const): Likewise.
      	(propagate_nothrow): Likewise.
      	(dump_malloc_lattice): Likewise.
      	(propagate_malloc): Likewise.
      	(pass_local_pure_const::execute): Likewise.
      	* ipa-visibility.c (optimize_weakref): Likewise.
      	(function_and_variable_visibility): Likewise.
      	* ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
      	(ipa_discover_variable_flags): Likewise.
      	* lto-streamer-out.c (output_function): Likewise.
      	(output_constructor): Likewise.
      	* tree-inline.c (copy_bb): Likewise.
      	* tree-ssa-structalias.c (ipa_pta_execute): Likewise.
      	* varpool.c (symbol_table::remove_unreferenced_decls): Likewise.
      2020-01-08  Martin Liska  <mliska@suse.cz>
      
      	* lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or
      	::dump_asm_name instead of (::name or ::asm_name).
      	(lto_balanced_map): Likewise.
      	(promote_symbol): Likewise.
      	(rename_statics): Likewise.
      	* lto.c (lto_wpa_write_files): Likewise.
      2020-01-08  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/ipa/ipa-icf-1.c: Update expected scanned output.
      	* gcc.dg/ipa/ipa-icf-10.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-11.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-12.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-13.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-16.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-18.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-2.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-20.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-21.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-23.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-25.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-26.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-27.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-3.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-35.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-36.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-37.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-38.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-5.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-7.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-8.c: Likewise.
      	* gcc.dg/ipa/ipa-icf-merge-1.c: Likewise.
      	* gcc.dg/ipa/pr64307.c: Likewise.
      	* gcc.dg/ipa/pr90555.c: Likewise.
      	* gcc.dg/ipa/propmalloc-1.c: Likewise.
      	* gcc.dg/ipa/propmalloc-2.c: Likewise.
      	* gcc.dg/ipa/propmalloc-3.c: Likewise.
      
      From-SVN: r280009
      Martin Liska committed
    • libgomp.texi: Fix typos, use https (actual change) · c1030b5c
      From-SVN: r280008
      Tobias Burnus committed
    • libgomp.texi: Fix typos, use https. · df2c0d36
      From-SVN: r280007
      Tobias Burnus committed
    • re PR tree-optimization/93199 (Compile time hog in sink_clobbers) · fb768529
      2020-01-08  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/93199
      	* tree-eh.c (sink_clobbers): Update virtual operands for
      	the first and last stmt only.  Add a dry-run capability.
      	(pass_lower_eh_dispatch::execute): Perform clobber sinking
      	after CFG manipulations and in RPO order to catch all
      	secondary opportunities reliably.
      
      From-SVN: r280006
      Richard Biener committed
    • re PR target/93182 ([avr] Add -nodevicespecs option.) · 949f0062
      	PR target/93182
      	* doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
      
      From-SVN: r280005
      Georg-Johann Lay committed
    • re PR other/92997 (gcc.dg/torture/ftrapv-1.c fails starting with r279523) · 0f3072b5
      2020-01-08  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/92997
      	* gcc.dg/torture/ftrapv-1.c (iaddv): Use noipa attribute.
      
      From-SVN: r280003
      Richard Biener committed
    • * gcc/doc/install.texi: Typo. · d672c0af
      From-SVN: r280002
      Georg-Johann Lay committed
    • re PR tree-optimization/93199 (Compile time hog in sink_clobbers) · f74c4b2c
      2019-01-08  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/93199
      	c/
      	* gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
      	permanently.
      
      	* gimple-fold.c (rewrite_to_defined_overflow): Mark stmt modified.
      	* tree-ssa-loop-im.c (move_computations_worker): Properly adjust
      	virtual operand, also updating SSA use.
      	* gimple-loop-interchange.cc (loop_cand::undo_simple_reduction):
      	Update stmt after resetting virtual operand.
      	(tree_loop_interchange::move_code_to_inner_loop): Likewise.
      
      	* gimple-iterator.c (gsi_remove): When not removing the stmt
      	permanently do not delink immediate uses or mark the stmt modified.
      
      From-SVN: r280000
      Richard Biener committed
    • Replace node->name/node->order with node->dump_name. · d597b944
      2020-01-08  Martin Liska  <mliska@suse.cz>
      
      	* ipa-fnsummary.c (dump_ipa_call_summary): Use symtab_node::dump_name.
      	(ipa_call_context::estimate_size_and_time): Likewise.
      	(inline_analyze_function): Likewise.
      2020-01-08  Martin Liska  <mliska@suse.cz>
      
      	* lto-partition.c (lto_balanced_map): Use symtab_node::dump_name.
      
      From-SVN: r279999
      Martin Liska committed
    • Use dump_asm_name for Callers/Calls in dump. · 4dfa3251
      2020-01-08  Martin Liska  <mliska@suse.cz>
      
      	* cgraph.c (cgraph_node::dump): Use systematically
      	dump_asm_name.
      
      From-SVN: r279998
      Martin Liska committed
    • Add -nodevicespecs option for avr. · e3e131c9
      gcc/
      	Add -nodevicespecs option for avr.
      
      	PR target/93182
      	* config/avr/avr.opt (-nodevicespecs): New driver option.
      	* config/avr/driver-avr.c (avr_devicespecs_file): Only issue
      	"-specs=device-specs/..." if that option is not set.
      	* doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
      
      From-SVN: r279995
      Georg-Johann Lay committed
    • Implement 64-bit double functions. · f30dd607
      gcc/
      	PR target/92055
      	* config.gcc (tm_defines) [target=avr]: Support --with-libf7,
      	--with-double-comparison.
      	* doc/install.texi: Document them.
      	* config/avr/avr-c.c (avr_cpu_cpp_builtins)
      	<WITH_LIBF7_LIBGCC, WITH_LIBF7_MATH, WITH_LIBF7_MATH_SYMBOLS>
      	<WITH_DOUBLE_COMPARISON>: New built-in defines.
      	* doc/invoke.texi (AVR Built-in Macros): Document them.
      	* config/avr/avr-protos.h (avr_float_lib_compare_returns_bool): New.
      	* config/avr/avr.c (avr_float_lib_compare_returns_bool): New function.
      	* config/avr/avr.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): New macro.
      libgcc/
      	PR target/92055
      	* config.host (tmake_file) [target=avr]: Add t-libf7,
      	t-libf7-math, t-libf7-math-symbols as specified by --with-libf7=.
      	* config/avr/t-avrlibc: Don't copy libgcc.a if there are modules
      	depending on sizeof (double) or sizeof (long double).
      	* config/avr/libf7: New folder.
      libgcc/config/avr/libf7/
      	PR target/92055
      	* t-libf7: New file.
      	* t-libf7-math: New file.
      	* t-libf7-math-symbols: New file.
      	* libf7-common.mk: New file.
      	* libf7-asm-object.mk: New file.
      	* libf7-c-object.mk: New file.
      	* asm-defs.h: New file.
      	* libf7.h: New file.
      	* libf7.c: New file.
      	* libf7-asm.sx: New file.
      	* libf7-array.def: New file.
      	* libf7-const.def: New file.
      	* libf7-constdef.h: New file.
      	* f7renames.sh: New script.
      	* f7wraps.sh: New script.
      	* f7-renames.h: New generated file.
      	* f7-wraps.h: New generated file.
      
      From-SVN: r279994
      Georg-Johann Lay committed
    • arm: Fix rmprofile multilibs when architecture includes +mp or +sec (PR target/93188) · d5bc1808
      When only the rmprofile multilibs are built, compiling for armv7-a
      should select the generic v7 multilibs.  This used to work before +sec
      and +mp were added to the architecture options but it was broken by
      that update.  This patch fixes those variants and adds some tests to
      ensure that they remain fixed ;-)
      
      	PR target/93188
      	* config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
      	armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
      	when only building rm-profile multilibs.
      
      	* gcc.target/arm/multilib.exp: Add new tests for rm-profile only.
      
      From-SVN: r279993
      Richard Earnshaw committed
    • whitespace · 54b0c0f0
      From-SVN: r279989
      Jason Merrill committed
    • Rename condition_variable_any wait* methods to match current draft standard · 9e3c1eb7
      2020-01-07  Thomas Rodgers  <trodgers@redhat.com>
      
      	* include/std/condition_variable
      	(condition_variable_any::wait_on): Rename to match current draft
      	standard.
      	(condition_variable_any::wait_on_until): Likewise.
      	(condition_variable_any::wait_on_for): Likewise.
      	* testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
      	Adjust tests to account for renamed methods.
      
      From-SVN: r279988
      Thomas Rodgers committed
    • Find matched aggregate lattice for self-recursive CP (PR ipa/93084) · 42d73fa9
      2020-01-08  Feng Xue  <fxue@os.amperecomputing.com>
      
              PR ipa/93084
              * ipa-cp.c (self_recursively_generated_p): Find matched aggregate
              lattice for a value to check.
              (propagate_vals_across_arith_jfunc): Add an assertion to ensure
              finite propagation in self-recursive scc.
      
      2020-01-08  Feng Xue  <fxue@os.amperecomputing.com>
      
              PR ipa/93084
              * gcc.dg/ipa/ipa-clone-3.c: New test.
      
      From-SVN: r279987
      Feng Xue committed
    • Partially revert ipa-inline caller_growth_limits · 709d7838
      We need to revert one line of code change from r279942 due to
      performance degression.
      
      gcc/ChangeLog:
      
      	2020-01-08  Luo Xiong Hu  <luoxhu@linux.ibm.com>
      
      	PR middle-end/93189
      	* ipa-inline.c (caller_growth_limits): Restore the AND.
      
      From-SVN: r279986
      Luo Xiong Hu committed
    • compiler: fix loopdepth tracking in array slicing expression in escape analysis · fc6dbd58
          
          In the gc compiler, for slicing an array, its AST has an implicit
          address operation node. There isn't such node in the gofrontend
          AST. During the escape analysis, we create a fake node to mimic
          the gc compiler's behavior. For the fake node, the loopdepth was
          not tracked correctly, causing miscompilation. Since this is an
          address operation, do the same thing as we do for the address
          operator.
          
          Fixes golang/go#36404.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213643
      
      From-SVN: r279984
      Ian Lance Taylor committed
    • Daily bump. · fd9ca4c6
      From-SVN: r279983
      GCC Administrator committed
  2. 07 Jan, 2020 13 commits