1. 21 Apr, 2019 4 commits
    • 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
  2. 20 Apr, 2019 6 commits
  3. 19 Apr, 2019 11 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
    • Daily bump. · 1ad6b210
      From-SVN: r270451
      GCC Administrator committed
  4. 18 Apr, 2019 16 commits
  5. 17 Apr, 2019 3 commits
    • PR libstdc++/90105 make forward_list::sort stable · 8c710065
      While testing the fix I also discovered that operator== assumes the
      elements are comparable with operator!= which is not required.
      
      	PR libstdc++/90105
      	* include/bits/forward_list.h (operator==): Do not use operator!= to
      	compare elements.
      	(forward_list<T, A>::sort(Comp)): When elements are equal take the one
      	earlier in the list, so that sort is stable.
      	* testsuite/23_containers/forward_list/operations/90105.cc: New test.
      	* testsuite/23_containers/forward_list/comparable.cc: Test with
      	types that meet the minimum EqualityComparable and LessThanComparable
      	requirements. Remove irrelevant comment.
      
      From-SVN: r270427
      Jonathan Wakely committed
    • rs6000: Remove a comma in a debug string · 2ad37a09
      It is a bit confusing, it looks as if the compiler tried to print
      something there.
      
      
      	* config/rs6000/rs6000.c (rs6000_register_move_cost): Fix typo.
      
      From-SVN: r270426
      Segher Boessenkool committed
    • Fix condition for std::variant to be copy constructible · 5f00d0d5
      The standard says the std::variant copy constructor is defined as
      deleted unless all alternative types are copy constructible, but we were
      making it also depend on move constructible. Fix the condition and
      enhance the tests to check the semantics with pathological copy-only
      types (i.e. supporting copying but having deleted moves).
      
      The enhanced tests revealed a regression in copy assignment for
      non-trivial alternative types, where the assignment would not be
      performed because the condition in the _Copy_assign_base visitor is
      false: is_same_v<remove_reference_t<T&>, remove_reference_t<const T&>>.
      
      	* include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
      	Do not depend on whether all alternative types are move constructible.
      	(__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
      	from the operand when deciding whether to perform the assignment.
      	* testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
      	with deleted move constructor and deleted move assignment operator.
      	(default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
      	behaviour of variants with DeletedMoves as an alternative.
      	* testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
      	(move_ctor, move_assign): Check that moving a variant with a
      	DeletedMoves alternative falls back to copying instead of moving.
      
      From-SVN: r270425
      Jonathan Wakely committed