1. 23 Apr, 2019 6 commits
    • Fix whitespace in ChangeLog · 70265a0c
      From-SVN: r270503
      Jonathan Wakely committed
    • Fix std::variant regression caused by never-valueless optimization · 47a468bd
      A regression was introduced by the recent changes to provide the strong
      exception safety guarantee for "never valueless" types that have O(1),
      non-throwing move assignment. The problematic code is:
      
        else if constexpr (__detail::__variant::_Never_valueless_alt<type>())
          {
            // This construction might throw:
            variant __tmp(in_place_index<_Np>, __il,
                          std::forward<_Args>(__args)...);
            // But _Never_valueless_alt<type> means this won't:
            *this = std::move(__tmp);
          }
      
      When the variant is not assignable, the assignment is ill-formed, so
      should not be attempted. When the variant has a copy assignment operator
      but not a move assignment operator, the assignment performs a copy
      assignment and that could throw, so should not be attempted.
      
      The solution is to only take that branch when the variant has a move
      assignment operator, which is determined by the _Traits::_S_move_assign
      constant. When that is false the strong exception safety guarantee is
      not possible, and so the __never_valueless function should also depend
      on _S_move_assign.
      
      While testing the fixes for this I noticed that the partial
      specialization _Never_valueless_alt<basic_string<C,T,A>> incorrectly
      assumed that is_nothrow_move_constructible<basic_string<C,T,A>> is
      always true, but that's wrong for fully-dynamic COW strings. Fix the
      partial specialization, and improve the comment describing
      _Never_valueless_alt to be clear it depends on move construction as well
      as move assignment.
      
      Finally, I also observed that _Variant_storage<false, T...>::_M_valid()
      was not taking advantage of the __never_valueless<T...>() function to
      avoid a runtime check. Only the _Variant_storage<true, T...>::_M_valid()
      function was using __never_valueless. That is also fixed.
      
      	PR libstdc++/87431
      	* include/bits/basic_string.h (_Never_valueless_alt): Make partial
      	specialization also depend on is_nothrow_move_constructible.
      	* include/std/variant (__detail::__variant::__never_valueless()):
      	Only true if the variant would have a move assignment operator.
      	(__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
      	Check __never_valueless<T...>().
      	(variant::emplace): Only perform non-throwing move assignments
      	for never-valueless alternatives if the variant has a move assignment
      	operator.
      	* testsuite/20_util/variant/compile.cc: Check that never-valueless
      	types can be emplaced into non-assignable variants.
      	* testsuite/20_util/variant/run.cc: Check that never-valueless types
      	don't get copied when emplaced into non-assignable variants.
      
      From-SVN: r270502
      Jonathan Wakely committed
    • Make some std::variant helper functions noexcept · be46043e
      	* include/std/variant (__detail::__variant::__ref_cast): Remove
      	unused function.
      	(__detail::__variant::_Uninitialized::_M_get)
      	(__detail::__variant::__get)
      	(__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
      
      From-SVN: r270501
      Jonathan Wakely committed
    • re PR tree-optimization/90078 (ICE with deep templates caused by overflow) · 4b5689aa
      	PR tree-optimization/90078
      	* tree-ssa-loop-ivopts.c (comp_cost::operator +,-,+=,-+,/=,*=): Add
      	checks for infinite_cost overflow.
      
      	gcc/testsuite
      	* gcc/testsuite/g++.dg/tree-ssa/pr90078.C: New test.
      
      	Also fix typo in ChangeLog entry for revision 270499.
      
      From-SVN: r270500
      Bin Cheng committed
    • re PR tree-optimization/90021 (ICE in index_in_loop_nest, at tree-data-ref.h:587 since r270203) · 9e14603d
      	PR tree-optimization/92001
      	* tree-chrec.c (evolution_function_is_univariate_p): New parameter
      	and check univariate against it.
      	* tree-chrec.h (evolution_function_is_univariate_p): New parameter.
      	* tree-data-ref.c (add_other_self_distances): Pass new argument.
      
      	gcc/testsuite
      	* gcc/testsuite/gfortran.dg/pr90021.f90: New test.
      
      From-SVN: r270499
      Bin Cheng committed
    • Daily bump. · 6e8fc175
      From-SVN: r270498
      GCC Administrator committed
  2. 22 Apr, 2019 7 commits
  3. 21 Apr, 2019 11 commits
    • re PR d/90130 (gdc.test/runnable/test12.d FAILs) · 3595df34
          PR d/90130
      d/dmd: Merge upstream dmd 065fbd452
      
      Fixes endian bug in CTFE, and corrects tests in the D2 testsuite that
      failed on big endian targets.
      
      Initial patch by Robin Dapp.
      
      Reviewed-on: https://github.com/dlang/dmd/pull/9665
      
      From-SVN: r270485
      Iain Buclaw committed
    • LRA: Revert "Remove useless move insns" · f94302e9
      Useless move insn removal was added to LRA just to avoid wasting CPU
      cycles on such insn processing afterwards.  Such insns are removed
      anyway later in the pass pipeline.  The CPU time savings are tiny but
      the removal creates too many problems including PR target/90178.
      Vladimir pre-approved the patch to remove the code:
      
      https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00834.html
      
      gcc/
      
      	PR target/90178
      	Revert:
      	2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
      
      	Revert the revert:
      	2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
      
      	Revert:
      	2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
      
      	* lra-spills.c (lra_final_code_change): Remove useless move insns.
      
      gcc/testsuite/
      
      	PR target/90178
      	* gcc.target/i386/pr90178.c: New test.
      
      From-SVN: r270484
      H.J. Lu committed
    • re PR d/90064 (InSituRegion lacks SPARC64 support) · 6397d8df
      	PR d/90064
      libphobos: Merge upstream phobos 428460ddd
      
      Defines growDownwards on SPARC64, initial patch by Rainer Orth.
      
      Backports another fix to std.process, allowing permissions tests to be
      skipped when running as root.
      
      Reviewed-on: https://github.com/dlang/phobos/pull/6962
      
      From-SVN: r270483
      Iain Buclaw committed
    • libphobos: Merge upstream druntime 4b2674b3 · 6d679a7d
      Adds version (BacktraceExternal) for using libexecinfo instead of
      internal implementation on FreeBSD, NetBSD, and DragonFly.
      
      Reviewed-on: https://github.com/dlang/druntime/pull/2560
      
      From-SVN: r270482
      Iain Buclaw committed
    • MAINTAINERS - add iains as darwin co-maintainer. · 42d3fe9a
      2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* MAINTAINERS: Add myself as co-maintainer for Darwin.
      
      From-SVN: r270481
      Iain Sandoe committed
    • Fix test fails on powerpc-darwin. · befa8711
      The current implementation of “speculation_barrier”
      and “group_end_nop” insns emit hard-wired register
      names which causes tests using them to fail on Darwin,
      at least, which uses “rNN” instead of “NN”.
      
      The patch makes the register names for these insns use
      the operand output mechanism to substitute the
      appropriate variant when needed.
      
      gcc/
      
      2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/rs6000/rs6000.md (group_end_nop): Emit insn register
      	names using operand format, rather than hard-wired.
      	(speculation_barrier): Likewise.
      
      From-SVN: r270480
      Iain Sandoe committed
    • libstdc++-v3 Skip tests on Darwin8-10. · 375eb99a
      These earlier Darwin versions have “FP_≈” inside a
      comment in architecture/{ppc,i386}/math.h, which is
      included by math.h which causes the tests to fail.
      
      The intent of the tests (i.e. to ensure that the
      library itself does not emit non-ascii) is covered
      by other platforms, including later Darwin editions.
      
      2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
      	to Darwin10.
      	* testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
      	* testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
      	* testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
      	* testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
      
      From-SVN: r270479
      Iain Sandoe committed
    • d: Use semanticRun to prevent declaration pass from running multiple times. · e64deb74
      This shouldn't happen during normal traversal of the AST provided from
      the front-end, however as there are some cases where declarations need
      to be visited out of order, such as what is being done in PR d/89017, it
      then becomes necessary to guard against this.
      
      gcc/d/ChangeLog:
      
      2019-04-21  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	* decl.cc (DeclVisitor::visit(Import)): Set semanticRun after
      	completion, guard against being called more than once.
      	(DeclVisitor::visit(StructDeclaration)): Likewise.
      	(DeclVisitor::visit(ClassDeclaration)): Likewise.
      	(DeclVisitor::visit(InterfaceDeclaration)): Likewise.
      	(DeclVisitor::visit(VarDeclaration)): Likewise.
      	(DeclVisitor::visit(TypeInfoDeclaration)): Likewise.
      
      From-SVN: r270478
      Iain Buclaw committed
    • d: Ensure all unittests are registered against the original module. · f452f0d6
      As any unittest functions registered against the testing module when
      compiling with -fbuilding-libphobos-tests are ignored during the
      generation of the ModuleInfo data.
      
      gcc/d/ChangeLog:
      
      2019-04-21  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	* modules.cc (register_module_decl): Don't register unittests against
      	the ModuleInfo symbol for -fbuilding-libphobos-tests.
      
      From-SVN: r270477
      Iain Buclaw committed
    • pr89009.C: Add dg-require-effective-target fpic. · 7bbcf395
      2019-04-20  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/testsuite/
      	* g++.dg/ipa/pr89009.C: Add dg-require-effective-target fpic.
      
      From-SVN: r270476
      Sandra Loosemore committed
    • Daily bump. · 21123d66
      From-SVN: r270475
      GCC Administrator committed
  4. 20 Apr, 2019 6 commits
  5. 19 Apr, 2019 10 commits
    • Improve implementation of parallel equal() · a34d6343
      	* include/pstl/algorithm_impl.h
      	(__internal::__brick_equal): use "4 iterator" version of
      	std::equal().
      	(__internal::__brick_equal): use simd for random access
      	iterators on unsequenced execution policies.
      	(__internal::__pattern_equal): add "4 iterator" version
      	(__internal::__pattern_equal): dispatch to simd __brick_equal
      	for vector-only execution policies.
      	(__internal::__pattern_equal): dispatch to __parallel_or for
      	parallel execution policies.
      	* include/pstl/glue_algorithm_impl.h
      	(std::equal): dispatch to "4 iterator" version of
      	__internal::__pattern_equal().
      
      From-SVN: r270463
      Thomas Rodgers committed
    • * de.po, es.po, fr.po, sv.po: Update. · 53db57cc
      From-SVN: r270462
      Jakub Jelinek committed
    • tree-call-cdce: If !HONOR_NANS do not make code with NaNs (PR88055) · c5c4d431
      If we don't HONOR_NANS we should not try to use any unordered
      comparison results.  Best case those will just be optimized away;
      realistically, they ICE.  For example, the rs6000 backend has some
      code that specifically checks we never do this.
      
      
      	PR tree-optimization/88055
      	* tree-call-cdce.c (comparison_code_if_no_nans): New function.
      	(gen_one_condition): Use it if !HONOR_NANS.
      
      From-SVN: r270460
      Segher Boessenkool committed
    • re PR c++/89900 (ICE: Segmentation fault (in check_instantiated_arg)) · 3734fb6a
      /cp
      2019-04-19  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/89900
      	* pt.c (fn_type_unification): When handling null explicit
      	arguments do not special case non-parameter packs.
      
      /testsuite
      2019-04-19  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/89900
      	* g++.dg/cpp0x/pr89900-1.C: New.
      	* g++.dg/cpp0x/pr89900-2.C: Likewise.
      	* g++.dg/cpp0x/pr89900-3.C: Likewise.
      	* g++.dg/cpp0x/pr89900-4.C: Likewise.
      
      From-SVN: r270459
      Paolo Carlini committed
    • libgo/go/syscall: add SockAddrDatalink on AIX · f4488799
          
          This patch is required in order to build golang.org/x/net. The
          corresponding Go Toolchain patch is CL 170537.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172898
      
      From-SVN: r270458
      Ian Lance Taylor committed
    • re PR middle-end/90139 (ICE in emit_block_move_hints, at expr.c:1601) · a7bfaee5
      	PR middle-end/90139
      	* tree-outof-ssa.c (get_temp_reg): If reg_mode is BLKmode, return
      	assign_temp instead of gen_reg_rtx.
      
      	* gcc.c-torture/compile/pr90139.c: New test.
      
      From-SVN: r270457
      Jakub Jelinek committed
    • re PR c++/90138 (ICE on invalid in contains_struct_check()) · 7296c0c5
      	PR c++/90138
      	* pt.c (process_template_parm): Set decl to pushdecl result.  If
      	!is_non_type, also set parm to that.
      
      	* g++.dg/template/pr90138.C: New test.
      
      From-SVN: r270456
      Jakub Jelinek committed
    • re PR c/89888 (When switch controlling expression is promoted from type narrower… · c280b7ee
      re PR c/89888 (When switch controlling expression is promoted from type narrower than int, GCC does not diagnose identical cases)
      
      	PR c/89888
      	* c-common.h (c_add_case_label): Remove orig_type and outside_range_p
      	arguments.
      	(c_do_switch_warnings): Remove outside_range_p argument.
      	* c-common.c (check_case_bounds): Removed.
      	(c_add_case_label): Remove orig_type and outside_range_p arguments.
      	Don't call check_case_bounds.  Fold low_value as well as high_value.
      	* c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
      	Check for case labels outside of range of original type here and
      	adjust them.
      c/
      	* c-typeck.c (struct c_switch): Remove outside_range_p member.
      	(c_start_case): Don't clear it.
      	(do_case): Adjust c_add_case_label caller.
      	(c_finish_case): Adjust c_do_switch_warnings caller.
      cp/
      	* decl.c (struct cp_switch): Remove outside_range_p member.
      	(push_switch): Don't clear it.
      	(pop_switch): Adjust c_do_switch_warnings caller.
      	(finish_case_label): Adjust c_add_case_label caller.
      testsuite/
      	* c-c++-common/pr89888.c: New test.
      	* g++.dg/torture/pr40335.C: Change dg-bogus into dg-warning.
      	Don't expect -Wswitch-unreachable warning.
      
      From-SVN: r270455
      Jakub Jelinek committed
    • PR translation/90118 Missing space between words · 41804907
      2019-04-19  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	PR translation/90118
      
      	contrib/
      	* check-internal-format-escaping.py: Check that %< is not next to
      	a word.
      
      	gcc/
      	* config/aarch64/aarch64.c (aarch64_override_options_internal):
      	Add missing space before %<.
      
      From-SVN: r270454
      Christophe Lyon committed
    • re PR c++/90108 (ICE: Segmentation fault (in c_tree_chain_next)) · e7178413
      	PR c++/90108
      	* c-decl.c (merge_decls): If remove is main variant and
      	DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
      	variant that has newdecl as TYPE_NAME if any.
      
      	* decl.c (duplicate_decls): If remove is main variant and
      	DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
      	variant that has newdecl as TYPE_NAME if any.
      
      	* c-c++-common/pr90108.c: New test.
      
      From-SVN: r270453
      Jakub Jelinek committed