1. 10 Mar, 2020 3 commits
  2. 09 Mar, 2020 15 commits
    • c++: Fix convert_like in template [PR91465, PR93870, PR92031, PR94068] · d417b4f5
      The point of this patch is to fix the recurring problem of trees
      generated by convert_like while processing a template that break when
      substituting.  For instance, when convert_like creates a CALL_EXPR
      while in a template, substituting such a call breaks in finish_call_expr
      because we have two 'this' arguments.  Another problem is that we
      can create &TARGET_EXPR<> and then fail when substituting because we're
      taking the address of an rvalue.  I've analyzed some of the already fixed
      PRs and also some of the currently open ones:
      
      In c++/93870 we create EnumWrapper<E>::operator E(&operator~(E)).
      In c++/87145 we create S::operator int (&{N}).
      In c++/92031 we create &TARGET_EXPR <0>.
      
      The gist of the problem is when convert_like_real creates a call for
      a ck_user or wraps a TARGET_EXPR in & in a template.  So in these cases
      use IMPLICIT_CONV_EXPR.  In a template we shouldn't need to perform the
      actual conversion, we only need it's result type.
      perform_direct_initialization_if_possible and
      perform_implicit_conversion_flags can also create an IMPLICIT_CONV_EXPR.
      
      Given the change above, build_converted_constant_expr can return an
      IMPLICIT_CONV_EXPR so call fold_non_dependent_expr rather than
      maybe_constant_value to deal with that.
      
      To avoid the problem of instantiating something twice in a row I'm
      removing a call to instantiate_non_dependent_expr_sfinae in
      compute_array_index_type_loc.  And the build_converted_constant_expr
      pattern can now be simplified.
      
      2020-03-09  Marek Polacek  <polacek@redhat.com>
      
      	PR c++/92031 - bogus taking address of rvalue error.
      	PR c++/91465 - ICE with template codes in check_narrowing.
      	PR c++/93870 - wrong error when converting template non-type arg.
      	PR c++/94068 - ICE with template codes in check_narrowing.
      	* call.c (convert_like_real): Return IMPLICIT_CONV_EXPR
      	in a template when not ck_identity and we're dealing with a class.
      	(convert_like_real) <case ck_ref_bind>: Return IMPLICIT_CONV_EXPR
      	in a template if we need a temporary.
      	* decl.c (compute_array_index_type_loc): Remove
      	instantiate_non_dependent_expr_sfinae call.  Call
      	fold_non_dependent_expr instead of maybe_constant_value.
      	(build_explicit_specifier): Don't instantiate or create a sentinel
      	before converting the expression.
      	* except.c (build_noexcept_spec): Likewise.
      	* pt.c (convert_nontype_argument): Don't build IMPLICIT_CONV_EXPR.
      	Set IMPLICIT_CONV_EXPR_NONTYPE_ARG if that's what
      	build_converted_constant_expr returned.
      	* typeck2.c (check_narrowing): Call fold_non_dependent_expr instead
      	of maybe_constant_value.
      
      	* g++.dg/cpp0x/conv-tmpl2.C: New test.
      	* g++.dg/cpp0x/conv-tmpl3.C: New test.
      	* g++.dg/cpp0x/conv-tmpl4.C: New test.
      	* g++.dg/cpp0x/conv-tmpl5.C: New test.
      	* g++.dg/cpp0x/conv-tmpl6.C: New test.
      	* g++.dg/cpp1z/conv-tmpl1.C: New test.
      Marek Polacek committed
    • libstdc++: Handle type-changing path concatenations (PR 94063) · ea182fe6
      The filesystem::path::operator+= and filesystem::path::concat functions
      operate directly on the native format of the path and so can cause a
      path to mutate to a completely different type.
      
      For Windows combining a filename "x" with a filename ":" produces a
      root-name "x:". Similarly, a Cygwin root-directory "/" combined with a
      root-directory and filename "/x" produces a root-name "//x".
      
      Before this patch the implemenation didn't support those kind of
      mutations, assuming that concatenating two filenames would always
      produce a filename and concatenating with a root-dir would still have a
      root-dir.
      
      This patch fixes it simply by checking for the problem cases and
      creating a new path by re-parsing the result of the string
      concatenation. This is slightly suboptimal because the argument has
      already been parsed if it's a path, but more importantly it doesn't
      reuse any excess capacity that the path object being modified might
      already have allocated. That can be fixed later though.
      
      	PR libstdc++/94063
      	* src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
      	handle concatenations that change the type of the first component.
      	(path::operator+=(basic_string_view<value_type>)): Likewise.
      	* testsuite/27_io/filesystem/path/concat/94063.cc: New test.
      Jonathan Wakely committed
    • c++: Readd [LR]ROTATE_EXPR support to constexpr.c [PR94067] · 81fa6d73
      Since r10-6527-gaaa26bf4 fold_for_warn
      will perform maybe_constant_value even on some cp_fold produced trees and
      so can include rotate exprs which were removed last fall from constexpr.c
      
      2020-03-09  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94067
      	Revert
      	2019-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* constexpr.c (cxx_eval_constant_expression): Do not handle
      	RROTATE_EXPR and LROTATE_EXPR.
      
      	* g++.dg/warn/Wconversion-pr94067.C: New test.
      Jakub Jelinek committed
    • Revert: One more patch for PR93564: Prefer smaller hard regno when we do not honor reg alloc order. · 5dc1390b
      2020-03-09  Vladimir Makarov  <vmakarov@redhat.com>
      
      	Revert:
      
      	2020-02-28  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/93564
      	* ira-color.c (assign_hard_reg): Prefer smaller hard regno when we
      	do not honor reg alloc order.
      Vladimir N. Makarov committed
    • Fix 'A' operand modifier: PR inline-asm/94095 · a931bb50
      The problem here is there was a typo in the documentation
      for the 'A' modifier in the table, it was recorded as 'a'
      in the table on the modifier column.
      
      Committed as obvious.
      
      2020-03-09  Andrew Pinski  <apinski@marvell.com>
      
      	PR inline-asm/94095
      	* doc/extend.texi (x86 Operand Modifiers): Fix column
      	for 'A' modifier.
      Andrew Pinski committed
    • rs6000: Fix -mlong-double documentation · 9439378f
      gcc/ChangeLog
      
      2020-03-09  Carl Love  <cel@us.ibm.com>
      
      	* config/rs6000/rs6000.opt: Update the description of the
      	command line option.
      Carl Love committed
    • configure - build libgomp by default for amdgcn · 29b1533a
              * configure.ac: Build libgomp by default for amdgcn.
              * configure: Regenerate.
      Tobias Burnus committed
    • c++: Fix ABI issue with alignas on armv7hl [PR94050] · 8475f290
      The static_assert in the following test was failing on armv7hl because
      we were disregarding the alignas specifier on Cell.  BaseShape's data
      takes up 20B on 32-bit architectures, but we failed to round up its
      TYPE_SIZE.  This happens since the
      <https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01189.html>
      patch: here, in layout_class_type for TenuredCell, we see that the size
      of TenuredCell and its CLASSTYPE_AS_BASE match, so we set
      
        CLASSTYPE_AS_BASE (t) = t;
      
      While TYPE_USER_ALIGN of TenuredCell was 0, because finalize_type_size
      called from finish_record_layout reset it, TYPE_USER_ALIGN of its
      CLASSTYPE_AS_BASE still remained 1.  After we replace it, it's no longer
      1.  Then we perform layout_empty_base_or_field for TenuredCell and since
      TYPE_USER_ALIGN of its CLASSTYPE_AS_BASE is now 0, we don't do this
      adjustment:
      
        if (CLASSTYPE_USER_ALIGN (type))
          {
            rli->record_align = MAX (rli->record_align, CLASSTYPE_ALIGN (type));
            if (warn_packed)
              rli->unpacked_align = MAX (rli->unpacked_align, CLASSTYPE_ALIGN (type));
            TYPE_USER_ALIGN (rli->t) = 1;
          }
      
      where rli->t is BaseShape.  Then finalize_record_size won't use the
      correct rli->record_align and therefore
        /* Round the size up to be a multiple of the required alignment.  */
        TYPE_SIZE (rli->t) = round_up (unpadded_size, TYPE_ALIGN (rli->t));
      after this we end up with the wrong size.
      
      Since the original fix was to avoid creating extra copies for LTO
      purposes, I think the following fix should be acceptable.
      
      	PR c++/94050 - ABI issue with alignas on armv7hl.
      	* class.c (layout_class_type): Don't replace a class's
      	CLASSTYPE_AS_BASE if their TYPE_USER_ALIGN don't match.
      
      	* g++.dg/abi/align3.C: New test.
      Marek Polacek committed
    • [testsuite][arm] Fix typo in fuse-caller-save.c · 157e23d8
      2020-03-09  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	* gcc.target/arm/fuse-caller-save.c: Fix DejaGnu typo.
      Christophe Lyon committed
    • Restore alignment in rs6000 target. · 314b9122
      	PR target/93800
      	* config/rs6000/rs6000.c (rs6000_option_override_internal):
      	Remove set of str_align_loops and str_align_jumps as these
      	should be set in previous 2 conditions in the function.
      	PR target/93800
      	* gcc.target/powerpc/pr93800.c: New test.
      Martin Liska committed
    • alias: Punt after walking too many VALUEs during a toplevel find_base_term call [PR94045] · 2e94d3ee
      As mentioned in the PR, on a largish C++ testcase the compile time
      on i686-linux is about 16 minutes on a fast box, mostly spent in
      find_base_term recursive calls dealing with very deep chains of preserved
      VALUEs during var-tracking.
      
      The following patch punts after we process many VALUEs (we already have code
      to punt if we run into a VALUE cycle).
      
      I've gathered statistics on when we punt this way (with BITS_PER_WORD, TU,
      function columns piped through sort | uniq -c | sort -n):
           36 32 ../../gcc/asan.c _Z29initialize_sanitizer_builtinsv.part.0
          108 32 _first_test.go reflect_test.reflect_test..import
         1005 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr85180.c foo
         1005 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87985.c foo
         1005 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr85180.c foo
         1005 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87985.c foo
         2534 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/stack-check-9.c f3
         6346 32 ../../gcc/brig/brig-lang.c brig_define_builtins
         6398 32 ../../gcc/d/d-builtins.cc d_define_builtins
         8816 32 ../../gcc/c-family/c-common.c c_common_nodes_and_builtins
         8824 32 ../../gcc/lto/lto-lang.c lto_define_builtins
        41413 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43058.c test
      Additionally, for most of these (for the builtins definitions tested just
      one) I've verified with a different alias.c change which didn't punt but
      in the toplevel find_base_term recorded if visited_vals reached the limit
      whether the return value was NULL_RTX or something different, and in all
      these cases the end result was NULL_RTX, so at least in these cases it
      should just shorten the time until it returns NULL.
      
      2020-03-09  Jakub Jelinek  <jakub@redhat.com>
      
      	PR rtl-optimization/94045
      	* params.opt (-param=max-find-base-term-values=): New option.
      	* alias.c (find_base_term): Add cut-off for number of visited VALUEs
      	in a single toplevel find_base_term call.
      Jakub Jelinek committed
    • Insert default return_void at the end of coroutine body · 016d0f9e
      Exception in coroutine is not correctly handled because the default
      return_void call is now inserted before the finish suspend point,
      rather than at the end of the original coroutine body.  This patch
      fixes the issue by expanding code as following:
        co_await promise.initial_suspend();
        try {
          // The original coroutine body
      
          promise.return_void(); // The default return_void call.
        } catch (...) {
          promise.unhandled_exception();
        }
        final_suspend:
        // ...
      
      gcc/cp/
          * coroutines.cc (build_actor_fn): Factor out code inserting the
          default return_void call to...
          (morph_fn_to_coro): ...here, also hoist local var declarations.
      
      gcc/testsuite/
          * g++.dg/coroutines/torture/co-ret-15-default-return_void.C: New.
      Bin Cheng committed
    • [testsuite] Fix PR94019 to check vector char when vect_hw_misalign · cb2c6020
      As PR94019 shows, without misaligned vector access support but with
      realign load, the vectorized loop will end up with realign scheme.
      It generates mask (control vector) with return type vector signed
      char which breaks the not check.
      
      gcc/testsuite/ChangeLog
      
      2020-03-09  Kewen Lin  <linkw@gcc.gnu.org>
      
          PR testsuite/94019
          * gcc.dg/vect/vect-over-widen-17.c: Don't expect vector char if
          it's without misaligned vector access support.
      Kewen Lin committed
    • [testsuite] Fix PR94023 to guard case under vect_hw_misalign · d5114529
      As PR94023 shows, the expected SLP requires misaligned vector access
      support.  This patch is to guard the check under the target condition
      vect_hw_misalign to ensure that.
      
      gcc/testsuite/ChangeLog
      
      2020-03-09  Kewen Lin  <linkw@gcc.gnu.org>
      
          PR testsuite/94023
          * gcc.dg/vect/slp-perm-12.c: Expect loop vectorized messages only on
          vect_hw_misalign targets.
      Kewen Lin committed
    • Daily bump. · 0b4ee25b
      GCC Administrator committed
  3. 08 Mar, 2020 4 commits
  4. 07 Mar, 2020 1 commit
  5. 06 Mar, 2020 17 commits
    • analyzer: improvements to region_model::get_representative_tree · 90f7c300
      This patch extends region_model::get_representative_tree so that dumps
      are able to refer to string literals, which I've found useful in
      investigating a state-bloat issue.
      
      Doing so uncovered a bug in the handling of views I introduced in
      r10-7024-ge516294a where the code was
      erroneously using TREE_TYPE on the view region's type, rather than just
      using its type, which the patch also fixes.
      
      gcc/analyzer/ChangeLog:
      	* analyzer.h (class array_region): New forward decl.
      	* program-state.cc (selftest::test_program_state_dumping_2): New.
      	(selftest::analyzer_program_state_cc_tests): Call it.
      	* region-model.cc (array_region::constant_from_key): New.
      	(region_model::get_representative_tree): Handle region_svalue by
      	generating an ADDR_EXPR.
      	(region_model::get_representative_path_var): In view handling,
      	remove erroneous TREE_TYPE when determining the type of the tree.
      	Handle array regions and STRING_CST.
      	(selftest::assert_dump_tree_eq): New.
      	(ASSERT_DUMP_TREE_EQ): New macro.
      	(selftest::test_get_representative_tree): New selftest.
      	(selftest::analyzer_region_model_cc_tests): Call it.
      	* region-model.h (region::dyn_cast_array_region): New vfunc.
      	(array_region::dyn_cast_array_region): New vfunc implementation.
      	(array_region::constant_from_key): New decl.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/analyzer/malloc-4.c: Update expected output of leak to
      	reflect fix to region_model::get_representative_path_var, adding
      	the missing "*" from the cast.
      David Malcolm committed
    • analyzer: improvements to state dumping · 41f99ba6
      This patch fixes a bug in which summarized state dumps involving a
      non-NULL pointer to a region for which get_representative_path_var
      returned NULL were erroneously dumped as "NULL".
      
      It also extends sm-state dumps so that they show representative tree
      values, where available.
      
      Finally, it adds some selftest coverage for such dumps.  Doing so
      requires replacing some %qE with a dump_quoted_tree, to avoid
      C vs C++ differences between "make selftest-c" and "make selftest-c++".
      
      gcc/analyzer/ChangeLog:
      	* analyzer.h (dump_quoted_tree): New decl.
      	* engine.cc (exploded_node::dump_dot): Pass region model to
      	sm_state_map::print.
      	* program-state.cc: Include diagnostic-core.h.
      	(sm_state_map::print): Add "model" param and use it to print
      	representative trees.  Only print origin information if non-null.
      	(sm_state_map::dump): Pass NULL for model to print call.
      	(program_state::print): Pass region model to sm_state_map::print.
      	(program_state::dump_to_pp): Use spaces rather than newlines when
      	summarizing.  Pass region_model to sm_state_map::print.
      	(ana::selftest::assert_dump_eq): New function.
      	(ASSERT_DUMP_EQ): New macro.
      	(ana::selftest::test_program_state_dumping): New function.
      	(ana::selftest::analyzer_program_state_cc_tests): Call it.
      	* program-state.h (program_state::print): Add model param.
      	* region-model.cc (dump_quoted_tree): New function.
      	(map_region::print_fields): Use dump_quoted_tree rather than
      	%qE to avoid lang-dependent output.
      	(map_region::dump_child_label): Likewise.
      	(region_model::dump_summary_of_map): For SK_REGION, when
      	get_representative_path_var fails, print the region id rather than
      	erroneously printing NULL.
      	* sm.cc (state_machine::get_state_by_name): New function.
      	* sm.h (state_machine::get_state_by_name): New decl.
      David Malcolm committed
    • Fix mangling ICE [PR94027] · 191bcd0f
      	PR c++/94027
      	* mangle.c (find_substitution): Don't call same_type_p on template
      	args that cannot match.
      
      Now same_type_p rejects argument packs, we need to be more careful
      calling it with template argument vector contents.
      
      The mangler needs to do some comparisons to find the special
      substitutions.  While that code looks a little ugly, this seems the
      smallest fix.
      Nathan Sidwell committed
    • [AArch64] Use intrinsics for widening multiplies (PR91598) · 0b839322
      Inline assembler instructions don't have latency info and the scheduler does
      not attempt to schedule them at all - it does not even honor latencies of
      asm source operands.  As a result, SIMD intrinsics which are implemented using
      inline assembler perform very poorly, particularly on in-order cores.
      Add new patterns and intrinsics for widening multiplies, which results in a
      63% speedup for the example in the PR, thus fixing the reported regression.
      
          gcc/
      	PR target/91598
      	* config/aarch64/aarch64-builtins.c (TYPES_TERNOPU_LANE): Add define.
      	* config/aarch64/aarch64-simd.md
      	(aarch64_vec_<su>mult_lane<Qlane>): Add new insn for widening lane mul.
      	(aarch64_vec_<su>mlal_lane<Qlane>): Likewise.
      	* config/aarch64/aarch64-simd-builtins.def: Add intrinsics.
      	* config/aarch64/arm_neon.h:
      	(vmlal_lane_s16): Expand using intrinsics rather than inline asm.
      	(vmlal_lane_u16): Likewise.
      	(vmlal_lane_s32): Likewise.
      	(vmlal_lane_u32): Likewise.
      	(vmlal_laneq_s16): Likewise.
      	(vmlal_laneq_u16): Likewise.
      	(vmlal_laneq_s32): Likewise.
      	(vmlal_laneq_u32): Likewise.
      	(vmull_lane_s16): Likewise.
      	(vmull_lane_u16): Likewise.
      	(vmull_lane_s32): Likewise.
      	(vmull_lane_u32): Likewise.
      	(vmull_laneq_s16): Likewise.
      	(vmull_laneq_u16): Likewise.
      	(vmull_laneq_s32): Likewise.
      	(vmull_laneq_u32): Likewise.
      	* config/aarch64/iterators.md (Vcondtype): New iterator for lane mul.
      	(Qlane): Likewise.
      Wilco Dijkstra committed
    • [AArch64] Fix lane specifier syntax · 3e5c062e
      The syntax for lane specifiers uses a vector element rather than a vector:
      
      fmls    v0.2s, v1.2s, v1.s[1]  // rather than v1.2s[1]
      
      Fix all the lane specifiers to use Vetype which uses the correct element type.
      
          gcc/
      	* aarch64/aarch64-simd.md (aarch64_mla_elt<mode>): Correct lane syntax.
      	(aarch64_mla_elt_<vswap_width_name><mode>): Likewise.
      	(aarch64_mls_elt<mode>): Likewise.
      	(aarch64_mls_elt_<vswap_width_name><mode>): Likewise.
      	(aarch64_fma4_elt<mode>): Likewise.
      	(aarch64_fma4_elt_<vswap_width_name><mode>): Likewise.
      	(aarch64_fma4_elt_to_64v2df): Likewise.
      	(aarch64_fnma4_elt<mode>): Likewise.
      	(aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
      	(aarch64_fnma4_elt_to_64v2df): Likewise.
      
          testsuite/
      	* gcc.target/aarch64/fmla_intrinsic_1.c: Check for correct lane syntax.
      	* gcc.target/aarch64/fmls_intrinsic_1.c: Likewise.
      	* gcc.target/aarch64/mla_intrinsic_1.c: Likewise.
      	* gcc.target/aarch64/mls_intrinsic_1.c: Likewise.
      Wilco Dijkstra committed
    • [AArch64][SVE] Add missing movprfx attribute to some ternary arithmetic patterns · 4a5c938b
      The two affected SVE2 patterns in this patch output a movprfx'ed instruction in their second alternative
      but don't set the "movprfx" attribute, which will result in the wrong instruction length being assumed by the midend.
      
      This patch fixes that in the same way as the other SVE patterns in the backend.
      
      Bootstrapped and tested on aarch64-none-linux-gnu.
      
      2020-03-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
      
      	* config/aarch64/aarch64-sve2.md (@aarch64_sve_<sve_int_op><mode>:
      	Specify movprfx attribute.
      	(@aarch64_sve_<sve_int_op>_lane_<mode>): Likewise.
      Kyrylo Tkachov committed
    • rs6000: Correct logic to disable NO_SUM_IN_TOC and NO_FP_IN_TOC [PR94065] · 3dcf51ad
      aix61.h, aix71.h and aix72.h intends to prevent SUM_IN_TOC and FP_IN_TOC
      when cmodel=large.  This patch defines the variables associated with the
      target options to 1 to _enable_ NO_SUM_IN_TOC and enable NO_FP_IN_TOC.
      
      Bootstrapped on powerpc-ibm-aix7.2.0.0
      
      	2020-03-06  David Edelsohn  <dje.gcc@gmail.com>
      	PR target/94065
      	* config/rs6000/aix61.h (TARGET_NO_SUM_IN_TOC): Set to 1 for
      	cmodel=large.
      	(TARGET_NO_FP_IN_TOC): Same.
      	* config/rs6000/aix71.h: Same.
      	* config/rs6000/aix72.h: Same.
      David Edelsohn committed
    • Avoid putting a REG_NOTE on anything other than an INSN in haifa-sched.c · e6ce69ca
      	PR rtl-optimization/93996
      	* haifa-sched.c (remove_notes): Be more careful when adding
      	REG_SAVE_NOTE.
      Andrew Pinski committed
    • arc: Update tumaddsidi4 test. · 4b62b396
      The test is using -O1 and, the macu instruction is generated by the
      combiner and not in the expand step. My previous "arc: Improve code
      gen for 64bit add/sub operations." is actually splitting the 64-bit
      add in the expand, leading to the impossibility to match the multiply
      and accumulate on 64 bit datum by the combiner, hence, the error. This
      patch is stepping up the optimization level which will generate the
      macu instruction at the expand time.
      
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/tumaddsidi4.c: Step-up optimization level.
      
      Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
      Claudiu Zissulescu committed
    • libstdc++: Add missing friend declaration to join_view::_Sentinel · 6aa2ca21
      The converting constructor of join_view::_Sentinel<true> needs to be able to
      access the private members of join_view::_Sentinel<false>.
      
      libstdc++-v3/ChangeLog:
      
      	* include/std/ranges (join_view::_Sentinel<_Const>): Befriend
      	join_view::_Sentinel<!_Const>.
      	* testsuite/std/ranges/adaptors/join.cc: Augment test.
      Patrick Palka committed
    • libstdc++: Give ranges::empty() a concrete return type (PR 93978) · 6d082cd9
      This works around PR 93978 by avoiding having to instantiate the body of
      ranges::empty() when checking the constraints of view_interface::operator
      bool().  When ranges::empty() has an auto return type, then we must instantiate
      its body in order to determine whether the requires expression {
      ranges::empty(_M_derived()); } is well-formed.  But this means instantiating
      view_interface::empty() and hence view_interface::_M_derived(), all before we've
      yet deduced the return type of join_view::end().  (The reason
      view_interface::operator bool() is needed in join_view::end() in the first place
      is because in this function we perform direct initialization of
      join_view::_Sentinel from a join_view, and so we try to find a conversion
      sequence from the latter to the former that goes through this conversion
      operator.)
      
      Giving ranges::empty() a concrete return type of bool should be safe according
      to [range.prim.empty]/4 which says "whenever ranges::empty(E) is a valid
      expression, it has type bool."
      
      This fixes the test case in PR 93978 when compiling without -Wall, but with -Wall
      the test case still fails due to the issue described in PR c++/94038, I think.
      I still don't quite understand why the test case doesn't fail without -O.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/93978
      	* include/bits/range_access.h (__cust_access::_Empty::operator()):
      	Declare return type to be bool instead of auto.
      	* testsuite/std/ranges/adaptors/93978.cc: New test.
      Patrick Palka committed
    • libstdc++: Fix call to __glibcxx_rwlock_init (PR 93244) · b0815713
      When the target doesn't define PTHREAD_RWLOCK_INITIALIZER we use a
      wrapper around pthread_wrlock_init, but the wrapper only takes one
      argument and we try to call it with two.
      
      This went unnnoticed on most targets because they do define the
      PTHREAD_RWLOCK_INITIALIZER macro, but it causes a bootstrap failure on
      darwin8.
      
      	PR libstdc++/93244
      	* include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
      	(__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
      	second argument to __glibcxx_rwlock_init.
      	* testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
      Jonathan Wakely committed
    • libstdc++: Fix failing filesystem::path tests (PR 93244) · 180eeeae
      The checks for PR 93244 don't actually pass on Windows (which is the
      target where the bug is present) because of a different bug, PR 94063.
      
      This adjusts the tests to not be affected by 94063 so that they verify
      that 93244 was fixed.
      
      	PR libstdc++/93244
      	* testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
      	test to not fail due to PR 94063.
      	* testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
      	* testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
      Jonathan Wakely committed
    • libstdc++: Deal with ENOSYS == ENOTSUP · 28119fba
      zTPF uses the same numeric value for ENOSYS and ENOTSUP.
      
      libstdc++-v3/ChangeLog:
      
      2020-03-06  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
      	would match ENOSYS.
      Andreas Krebbel committed
    • ACLE intrinsics: BFloat16 load intrinsics for AArch32 · eb637e76
      2020-03-06  Delia Burduv  <delia.burduv@arm.com>
      
      	* config/arm/arm_neon.h (vld2_bf16): New.
      	(vld2q_bf16): New.
      	(vld3_bf16): New.
      	(vld3q_bf16): New.
      	(vld4_bf16): New.
      	(vld4q_bf16): New.
      	(vld2_dup_bf16): New.
      	(vld2q_dup_bf16): New.
      	(vld3_dup_bf16): New.
      	(vld3q_dup_bf16): New.
      	(vld4_dup_bf16): New.
      	(vld4q_dup_bf16): New.
      	* config/arm/arm_neon_builtins.def
      	(vld2): Changed to VAR13 and added v4bf, v8bf
      	(vld2_dup): Changed to VAR8 and added v4bf, v8bf
      	(vld3): Changed to VAR13 and added v4bf, v8bf
      	(vld3_dup): Changed to VAR8 and added v4bf, v8bf
      	(vld4): Changed to VAR13 and added v4bf, v8bf
      	(vld4_dup): Changed to VAR8 and added v4bf, v8bf
      	* config/arm/iterators.md (VDXBF2): New iterator.
      	*config/arm/neon.md (neon_vld2): Use new iterators.
      	(neon_vld2_dup<mode): Use new iterators.
      	(neon_vld3<mode>): Likewise.
      	(neon_vld3qa<mode>): Likewise.
      	(neon_vld3qb<mode>): Likewise.
      	(neon_vld3_dup<mode>): Likewise.
      	(neon_vld4<mode>): Likewise.
      	(neon_vld4qa<mode>): Likewise.
      	(neon_vld4qb<mode>): Likewise.
      	(neon_vld4_dup<mode>): Likewise.
      	(neon_vld2_dupv8bf): New.
      	(neon_vld3_dupv8bf): Likewise.
      	(neon_vld4_dupv8bf): Likewise.
      
      	* gcc.target/arm/simd/bf16_vldn_1.c: New test.
      Delia Burduv committed