1. 25 Aug, 2018 4 commits
  2. 24 Aug, 2018 18 commits
    • Set start_location to 0 if we ran out of line map space · cf806c7d
      With profiledbootstrap and --with-build-config=bootstrap-lto, linemap_add
      may create a macro map when we run out of line map space.  This patch
      changes start_location to UNKNOWN_LOCATION (0) in this case.
      
      Tested with profiledbootstrap and --with-build-config=bootstrap-lto on
      Linux/x86-64.
      
      	PR bootstrap/86872
      	* line-map.c (pure_location_p): Return true if linemap_lookup
      	returns NULL.
      	(linemap_add): Set start_location to 0 if we run out of line map
      	space.
      
      From-SVN: r263845
      H.J. Lu committed
    • diagnostics: tweaks to line-spans vs line numbering (PR 87091) · acf6214e
      This patch tweaks how line numbers are printed for a diagnostic
      containing multiple line spans.
      
      With this patch, rather than printing span headers:
      
        ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:87:22: note: message
        ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:74:1:
        ++ |+#include <vector>
        74 | #endif
        ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:87:22:
        87 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
           |                      ^~~
      
      we now print:
      
        ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:87:22: note: message
        +++ |+#include <vector>
         74 | #endif
        ....
         87 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
            |                      ^~~
      
      and for sufficiently close lines, rather than print a gap:
      
        + |+#include <stdio.h>
        1 | test (int ch)
        ..
        3 |  putchar (ch);
          |  ^~~~~~~
      
      we print the line itself:
      
        + |+#include <stdio.h>
        1 | test (int ch)
        2 | {
        3 |  putchar (ch);
          |  ^~~~~~~
      
      gcc/ChangeLog:
      	PR 87091
      	* diagnostic-show-locus.c (layout::layout): Ensure the margin is
      	wide enough for jumps in the line-numbering to be visible.
      	(layout::print_gap_in_line_numbering): New member function.
      	(layout::calculate_line_spans): When using line numbering, merge
      	line spans that are only 1 line apart.
      	(diagnostic_show_locus): When printing line numbers, show gaps in
      	line numbering directly, rather than printing headers.
      	(selftest::test_diagnostic_show_locus_fixit_lines): Add test of
      	line-numbering with multiple line spans.
      	(selftest::test_fixit_insert_containing_newline_2): Add test of
      	line-numbering, in which the spans are close enough to be merged.
      
      gcc/testsuite/ChangeLog:
      	PR 87091
      	* gcc.dg/missing-header-fixit-3.c: Update for changes to how
      	line spans are printed with -fdiagnostics-show-line-numbers.
      
      From-SVN: r263843
      David Malcolm committed
    • gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range to range_includes_zero_p. · e5a3f08f
      	* gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
      	to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
      	* tree-vrp.c (range_is_nonnull): Remove.
      	(range_includes_zero_p): Accept value_range instead of min/max.
      	(extract_range_from_binary_expr_1): Do not early bail on
      	POINTER_PLUS_EXPR.
      	Use range_includes_zero_p instead of range_is_nonnull.
      	(extract_range_from_unary_expr): Use range_includes_zero_p instead
      	of range_is_nonnull.
      	(vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
      	special case VR_ANTI_RANGE.
      	(vrp_finalize): Same.
      	* tree-vrp.h (range_includes_zero_p): Pass value_range as argument
      	instead of min/max.
      	(range_is_nonnull): Remove.
      	* vr-values.c (vrp_stmt_computes_nonzero): Use
      	range_includes_zero_p instead of range_is_nonnull.
      	(extract_range_basic): Pass value_range to range_includes_zero_p
      	instead of range_is_nonnull.
      
      From-SVN: r263842
      Aldy Hernandez committed
    • new(nothrow) is malloc-like · 6eac0600
      2018-08-24  Marc Glisse  <marc.glisse@inria.fr>
      
      	PR libstdc++/86822
      	* libsupc++/new (operator new(size_t, nothrow_t), operator
      	new[](size_t, nothrow_t), operator new(size_t, align_val_t, nothrow_t),
      	operator new[](size_t, align_val_t, nothrow_t)): Add malloc attribute.
      
      From-SVN: r263841
      Marc Glisse committed
    • runtime: remove the dummy arg of getcallersp · 1d29bb04
          
          This is a port of https://golang.org/cl/109596 to the gofrontend, in
          preparation for updating libgo to 1.11.
          
          Original CL description:
          
              getcallersp is intrinsified, and so the dummy arg is no longer
              needed. Remove it, as well as a few dummy args that are solely
              to feed getcallersp.
          
          Reviewed-on: https://go-review.googlesource.com/131116
      
      From-SVN: r263840
      Ian Lance Taylor committed
    • Forward declare debug containers so std::pmr aliases work · 9ca2ac69
      Prior to this change, including a <debug/xxx> header when _GLIBCXX_DEBUG
      is also defined would fail to compile in C++17 or later. The <debug/xxx>
      header would include the standard <xxx> header which defined
      std::pmr::xxx as an alias for std::xxx. But in Debug Mode std::xxx
      refers to std::__debug::xxx which has not been defined yet (because it
      is in <debug/xxx> after the inclusion of <xxx>).
      
      This adds declarations of the debug containers before including the
      non-Debug Mode <xxx> header, so that the std::pmr::xxx aliases work.
      
      	* include/debug/deque (std::__debug::deque): Declare.
      	* include/debug/forward_list (std::__debug::forward_list): Declare.
      	* include/debug/list (std::__debug::list): Declare.
      	* include/debug/map (std::__debug::map): Declare.
      	* include/debug/set (std::__debug::set): Declare.
      	* include/debug/unordered_map (std::__debug::unordered_map): Declare.
      	* include/debug/unordered_set (std::__debug::unordered_set): Declare.
      	* include/debug/vector (std::__debug::vector): Declare.
      	* testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: New test.
      	* testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: New
      	test.
      	* testsuite/23_containers/list/pmr_typedefs_debug.cc: New test.
      	* testsuite/23_containers/map/pmr_typedefs_debug.cc: New test.
      	* testsuite/23_containers/multimap/pmr_typedefs_debug.cc: New test.
      	* testsuite/23_containers/multiset/pmr_typedefs_debug.cc: New test.
      	* testsuite/23_containers/set/pmr_typedefs_debug.cc: New test.
      	* testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc: New
      	test.
      	* testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
      	New test.
      	* testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
      	New test.
      	* testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc: New
      	test.
      	* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
      	Adjust dg-error lineno.
      	* testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: New
      	test.
      
      From-SVN: r263839
      Jonathan Wakely committed
    • re PR fortran/86837 (Optimization breaks an unformatted read with implicit loop) · 3413d168
      2018-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/86837
      	* frontend-passes.c (var_in_expr_callback): New function.
      	(var_in_expr): New function.
      	(traverse_io_block): Use var_in_expr instead of
      	gfc_check_dependency for checking if the variable depends on the
      	previous interators.
      
      2018-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/86837
      	* gfortran.dg/implied_do_io_6.f90: New test.
      
      From-SVN: r263838
      Thomas Koenig committed
    • Add a testcase for PR middle-end/87092 · 01aa3748
      	PR middle-end/87092
      	* gcc.dg/pr87092.c: New test.
      
      From-SVN: r263837
      H.J. Lu committed
    • re PR c++/67012 (decltype(auto) with trailing return type) · 13ff3e16
      	PR c++/67012
      	PR c++/86942
      	* decl.c (grokdeclarator): Disallow functions with trailing return
              type with decltype(auto) as its type.  Also check the function if
              it's inner declarator doesn't exist
      
      	* g++.dg/cpp0x/auto52.C: New test.
      	* g++.dg/cpp1y/auto-fn52.C: New test.
      	* g++.dg/cpp1y/auto-fn53.C: New test.
      	* g++.dg/cpp1y/auto-fn54.C: New test.
      
      From-SVN: r263836
      Marek Polacek committed
    • emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes. · eafa30ef
      	* emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
      	* emit-rtl.h (rtl_data): Remove return_bnd.
      	* explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
      	* function.c (diddle_return_value): Do not handle crtl->return_bnd.
      	* genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
      	(POINTER_BOUNDS_MODE): Remove definition.
      	(make_pointer_bounds_mode): Remove.
      	(get_mode_class): Do not handle MODE_POINTER_BOUNDS.
      	* machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
      	(scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
      	* mode-classes.def: Do not define MODE_POINTER_BOUNDS.
      	* stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
      	* tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
      	* varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
      
      	* config/i386/i386-modes.def (BND32, BND64): Remove.
      	* config/i386/i386.c (dbx_register_map): Remove bound registers.
      	(dbx64_register_map): Ditto.
      	(svr4_dbx_register_map): Ditto.
      	(indirect_thunk_bnd_needed): Remove.
      	(indirect_thunks_bnd_used): Ditto.
      	(indirect_return_bnd_needed): Ditto.
      	(indirect_return_via_cx_bnd): Ditto.
      	(enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
      	(indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
      	(output_indirect_thunk): Ditto.  Remove need_prefix argument.
      	(output_indirect_thunk_function): Remove handling of
      	indirect_return_bnd_needed, indirect_return_via_cx_bnd,
      	indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
      	(ix86_save_reg): Remove handling of crtl->return_bnd.
      	(ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
      	(ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
      	and UNSPEC_BNDLX_ADDR.
      	(ix86_output_indirect_branch_via_reg): Remove handling of
      	indirect_thunk_prefix_bnd.
      	(ix86_output_indirect_branch_via_push): Ditto.
      	(ix86_output_function_return): Ditto.
      	(ix86_output_indirect_function_return): Ditto.
      	(avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
      	* config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
      	(CALL_USED_REGISTERS): Ditto.
      	(REG_ALLOC_ORDER): Update for removal of bound registers.
      	(HI_REGISTER_NAMES): Ditto.
      	* config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
      	(UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
      	(UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
      	(BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
      	(FIRST_PSEUDO_REG): Update.
      	(BND): Remove mode iterator.
      	* config/i386/predicates.md (bnd_mem_operator): Remove.
      
      From-SVN: r263835
      Uros Bizjak committed
    • Define vect_perm for variable-length SVE · f5cd4f8c
      Variable-length SVE now supports enough permutes to define vect_perm.
      
      The change to vect_perm_supported is currently a no-op because the
      function is only called with a count of 3.
      
      2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/testsuite/
      	* lib/target-supports.exp (vect_perm_supported): Only return
      	false for variable-length vectors if the permute size is not
      	a power of 2.
      	(check_effective_target_vect_perm)
      	(check_effective_target_vect_perm_byte)
      	(check_effective_target_vect_perm_short): Remove check for
      	variable-length vectors.
      	* gcc.dg/vect/slp-23.c: Add an XFAIL for variable-length SVE.
      	* gcc.dg/vect/slp-perm-10.c: Likewise.
      	* gcc.dg/vect/slp-perm-9.c: Add an XFAIL for variable-length vectors.
      
      From-SVN: r263834
      Richard Sandiford committed
    • Avoid is_constant calls in vectorizable_bswap · 8c2f568c
      The "new" VEC_PERM_EXPR handling makes it easy to support bswap
      for variable-length vectors.
      
      2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
      	vectors.
      
      gcc/testsuite/
      	* gcc.target/aarch64/sve/bswap_1.c: New test.
      	* gcc.target/aarch64/sve/bswap_2.c: Likewise.
      	* gcc.target/aarch64/sve/bswap_3.c: Likewise.
      
      From-SVN: r263833
      Richard Sandiford committed
    • Handle SLP permutations for variable-length vectors · ab7e60ce
      The SLP code currently punts for all variable-length permutes.
      This patch makes it handle the easy case of N->N permutes in which
      the number of vector lanes is a multiple of N.  Every permute then
      uses the same mask, and that mask repeats (with a stride) every
      N elements.
      
      The patch uses the same path for constant-length vectors,
      since it should be slightly cheaper in terms of compile time.
      
      2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
      	the case in which the permute needs only a single element and
      	repeats for every vector of the result.  Extend that case to
      	handle variable-length vectors.
      	* tree-vect-stmts.c (vectorizable_load): Update accordingly.
      
      gcc/testsuite/
      	* gcc.target/aarch64/sve/slp_perm_1.c: New test.
      	* gcc.target/aarch64/sve/slp_perm_2.c: Likewise.
      	* gcc.target/aarch64/sve/slp_perm_3.c: Likewise.
      	* gcc.target/aarch64/sve/slp_perm_4.c: Likewise.
      	* gcc.target/aarch64/sve/slp_perm_5.c: Likewise.
      	* gcc.target/aarch64/sve/slp_perm_6.c: Likewise.
      	* gcc.target/aarch64/sve/slp_perm_7.c: Likewise.
      
      From-SVN: r263832
      Richard Sandiford committed
    • DWARF: Call set_indirect_string on DW_MACINFO_start_file · 1ade64c9
      Since -gsplit-dwarf -g3 will output filename as indirect string, call
      set_indirect_string on DW_MACINFO_start_file for -gsplit-dwarf -g3.
      
      gcc/
      
      	PR debug/79342
      	* dwarf2out.c (save_macinfo_strings): Call set_indirect_string
      	on DW_MACINFO_start_file for -gsplit-dwarf -g3.
      
      gcc/testsuite/
      
      	PR debug/79342
      	* gcc.dg/pr79342.: New test.
      
      From-SVN: r263831
      H.J. Lu committed
    • cfg.h (struct control_flow_graph): Add edge_flags_allocated and bb_flags_allocated members. · e144a2b3
      2018-08-24  Richard Biener  <rguenther@suse.de>
      
      	* cfg.h (struct control_flow_graph): Add edge_flags_allocated and
      	bb_flags_allocated members.
      	(auto_flag): New RAII class for allocating flags.
      	(auto_edge_flag): New RAII class for allocating edge flags.
      	(auto_bb_flag): New RAII class for allocating bb flags.
      	* cfgloop.c (verify_loop_structure): Allocate temporary edge
      	flag dynamically.
      	* cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
      	in favor of temporarily allocated BB flag.
      	* hsa-brig.c: Re-order includes.
      	* hsa-dump.c: Likewise.
      	* hsa-regalloc.c: Likewise.
      	* print-rtl.c: Likewise.
      	* profile-count.c: Likewise.
      
      From-SVN: r263830
      Richard Biener committed
    • rs6000: Check that the base of a TOCREL is the TOC (PR86989) · 6a84c265
      There currently is nothing that prevents replacing the TOC_REGISTER in
      a TOCREL unspec with something else, like a pseudo, or a memory ref.
      This of course does not work.  Fix that.
      
      Tested on powerpc64-linux {-m32,-m64}; committing.
      
      
      Segher
      
      
      2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
      
      	PR target/86989
      	* config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
      	the TOC register.
      
      ---
       gcc/config/rs6000/rs6000.c | 4 +++-
       1 file changed, 3 insertions(+), 1 deletion(-)
      
      diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
      index a967912..ed33912 100644
      --- a/gcc/config/rs6000/rs6000.c
      +++ b/gcc/config/rs6000/rs6000.c
      @@ -7932,7 +7932,9 @@ toc_relative_expr_p (const_rtx op, bool strict, const_rtx *tocrel_base_ret,
           *tocrel_offset_ret = tocrel_offset;
       
         return (GET_CODE (tocrel_base) == UNSPEC
      -	  && XINT (tocrel_base, 1) == UNSPEC_TOCREL);
      +	  && XINT (tocrel_base, 1) == UNSPEC_TOCREL
      +	  && REG_P (XVECEXP (tocrel_base, 0, 1))
      +	  && REGNO (XVECEXP (tocrel_base, 0, 1)) == TOC_REGISTER);
       }
       
       /* Return true if X is a constant pool address, and also for cmodel=medium
      -- 
      1.8.3.1
      
      From-SVN: r263829
      Segher Boessenkool committed
    • PR 87073/bootstrap · 19b293bf
      	PR 87073/bootstrap
      	* wide-int-range.cc (wide_int_range_div): Do not ignore result
      	from wide_int_range_multiplicative_op.
      
      From-SVN: r263828
      Aldy Hernandez committed
    • Daily bump. · 17a4648c
      From-SVN: r263827
      GCC Administrator committed
  3. 23 Aug, 2018 18 commits
    • PR tree-optimization/87072 - false warning: array subscript is above array bounds · 6906ea8b
      gcc/testsuite/ChangeLog:
      	* gcc.dg/Warray-bounds-35.c: New test.
      
      From-SVN: r263822
      Martin Sebor committed
    • * async.h (ASYNC_IO): Revert _AIX test. · 464c1bd8
      From-SVN: r263821
      David Edelsohn committed
    • Fix failure when -fno-rtti test is run in C++17 or later · 763ef11b
      	* testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
      	Only define when RTTI is enabled.
      
      From-SVN: r263820
      Jonathan Wakely committed
    • tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo "permutaion". · 429ca5b4
      2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      
      	* tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
      	"permutaion".
      
      From-SVN: r263819
      Prathamesh Kulkarni committed
    • Fix typo 'exapnded' to 'expanded' · 35574a7b
      2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
      
      gcc/
      	* genmatch.c (parser::parse_operation): Fix typo 'exapnded'
      	to 'expanded'.
      
      gcc/ada/
      	* exp_unst.ads: Fix typo 'exapnded' to 'expanded'.
      
      From-SVN: r263818
      Giuliano Belinassi committed
    • scev: dump final value replacement expressions · 47a5f7dd
      	* tree-scalar-evolution.c (final_value_replacement_loop): Dump
      	full GENERIC expression used for replacement.
      
      From-SVN: r263817
      Alexander Monakov committed
    • Define debug mode function for C++98 · 568d5ee4
      This function is declared unconditionally but was only defined for C++11
      and later, leading to linker errors when the testsuite was run with
      -std=gnu++98 -D_GLIBCXX_DEBUG added to the flags.
      
      	* include/debug/vector (__niter_base): Define for C++98.
      
      From-SVN: r263816
      Jonathan Wakely committed
    • Fix C++98 tests to not use C++11 features. · c0787027
      	* testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
      	Fix C++98 test to not use C++11 features.
      	* testsuite/25_algorithms/fill_n/2.cc: Likewise.
      
      From-SVN: r263815
      Jonathan Wakely committed
    • Fix comments in testsuite script · 6de2ce26
      	* scripts/check_compile: Fix comments.
      
      From-SVN: r263814
      Jonathan Wakely committed
    • tree-vrp.c (abs_extent_range): Remove. · 62852194
      	* tree-vrp.c (abs_extent_range): Remove.
      	(extract_range_into_wide_ints): Pass wide ints by reference.
      	(extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
      	Pass wide ints by reference in all calls to
      	extract_range_into_wide_ints.
      	* wide-int-range.cc (wide_int_range_div): New.
      	* wide-int-range.h (wide_int_range_div): New.
      	(wide_int_range_includes_zero_p): New.
      	(wide_int_range_zero_p): New.
      
      From-SVN: r263813
      Aldy Hernandez committed
    • [AARCH64] use "arch_enabled" attribute for aarch64. · 488461d8
      arm.md has some attributes "arch" and "arch_enabled" to aid enabling
      and disabling insn alternatives based on the architecture being
      targeted.  This patch introduces a similar attribute in the aarch64
      backend.  The new attribute will be used to enable a new alternative
      for the atomic_store insn in a future patch, but is an atomic change
      in itself.
      
      The new attribute has values "any", "fp", "fp16", "simd", and "sve".
      These attribute values have been taken from the pre-existing
      attributes "fp", "fp16", "simd", and "sve".
      
      The standalone "fp" attribute has been reintroduced in terms of the
      "arch" attribute as it's needed for the xgene1.md scheduling file --
      the use in this file can't be changed to check for `(eq_attr "arch"
      "fp")` as the file is reused by the arm.md machine description whose
      'arch' attribute doesn't have an 'fp' value.
      
      2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
      
      	* config/aarch64/aarch64.md (arches): New enum.
      	(arch): New enum attr.
      	(arch_enabled): New attr.
      	(enabled): Now uses arch_enabled only.
      	(simd, sve, fp16): Removed attribute.
      	(fp): Attr now defined in terms of 'arch'.
      	(*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
      	*movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
      	<FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
      	<FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
      	attributes into 'arch'.
      	(*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
      	subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
      	*<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
      	*aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
      	*aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
      	'simd' attribute into 'arch'.
      	(load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
      	store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
      	Convert use of 'fp' attribute to 'arch'.
      	* config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
      	move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
      	into 'arch'.
      	(move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
      	(different modes) Merge 'fp' and 'simd' into 'arch'.
      	(*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
      	'simd' into 'arch'.
      
      From-SVN: r263811
      Matthew Malcomson committed
    • Fix recent bug in canonicalize_comparison (PR87026) · 84ea73e1
      The new code testing which way a comparison is best expressed creates
      a pseudoregister (by hand) and creates some insns with that.  Such
      insns will no longer recog() when pseudo-registers are no longer
      aloowed (after reload).  But we have an ifcvt pass after reload (ce3).
      
      This patch simply returns if we cannot create pseudos.
      
      
      	PR rtl-optimization/87026
      	* expmed.c (canonicalize_comparison): If we can no longer create
      	pseudoregisters, don't.
      
      From-SVN: r263810
      Segher Boessenkool committed
    • Fix C++11-ism in C++98 member function · 21bf6b2a
      	* include/debug/string (insert(__const_iterator, _InIter, _InIter)):
      	[!_GLIBCXX_USE_CXX11_ABI]: Replace use of C++11-only cbegin() with
      	begin(), for C++98 compatibility.
      
      From-SVN: r263809
      Jonathan Wakely committed
    • Fix testsuite failures for __gnu_debug::string with old ABI · 3eb1eda1
      The __gnu_debug string (mostly) implements the C++11 API, but when it
      wraps the old COW string many of the member functions in the base class
      have the wrong parameter types or return types. This makes the
      __gnu_debug::string type adapt itself to the base class API. This
      actually makes the debug string slightly more conforming than the
      underlying string type when using the old ABI.
      
      	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
      	(basic_string::__const_iterator): Change access to protected.
      	[!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define
      	as typedef for iterator.
      	* include/debug/string (__const_iterator): Use typedef from base.
      	(insert(const_iterator, _CharT))
      	(replace(const_iterator, const_iterator, const basic_string&))
      	(replace(const_iterator, const_iterator, const _CharT*, size_type))
      	(replace(const_iterator, const_iterator, const CharT*))
      	(replace(const_iterator, const_iterator, size_type, _CharT))
      	(replace(const_iterator, const_iterator, _InputIter, _InputIter))
      	(replace(const_iterator, const_iterator, initializer_list<_CharT>)):
      	Change const_iterator parameters to __const_iterator.
      	(insert(iterator, size_type, _CharT)): Add C++98 overload.
      	(insert(const_iterator, _InputIterator, _InputIterator)): Change
      	const_iterator parameter to __const_iterator.
      	[!_GLIBCXX_USE_CXX11_ABI]: Add workaround for incorrect return type
      	of base's member function.
      	(insert(const_iterator, size_type, _CharT)) [!_GLIBCXX_USE_CXX11_ABI]:
      	Likewise.
      	(insert(const_iterator, initializer_list<_CharT>))
      	[!_GLIBCXX_USE_CXX11_ABI]: Likewise.
      	* testsuite/21_strings/basic_string/init-list.cc: Remove effective
      	target directive.
      
      From-SVN: r263808
      Jonathan Wakely committed
    • [libiberty patch] Fix PGO bootstrap · 832c74d9
      https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01386.html
      	PR driver/87056
      	* pex-unix.c (pex_unix_exec_child): Duplicate bad_fn into local
      	scopes to avoid potential clobber.
      
      Co-Authored-By: Martin Liska <mliska@suse.cz>
      
      From-SVN: r263807
      Nathan Sidwell committed
    • PR target/86951 arm - Handle speculation barriers on pre-armv7 CPUs · ebdb6f23
      The AArch32 instruction sets prior to Armv7 do not define the ISB and
      DSB instructions that are needed to form a speculation barrier.  While
      I do not know of any instances of cores based on those instruction
      sets being vulnerable to speculative side channel attacks it is
      possible to run code built for those ISAs on more recent hardware
      where they would become vulnerable.
      
      This patch works around this by using a library call added to libgcc.
      That code can then take any platform-specific actions necessary to
      ensure safety.
      
      For the moment I've only handled two cases: the library code being
      built for armv7 or later anyway and running on Linux.
      
      On Linux we can handle this by calling the kernel function that will
      flush a small amount of cache.  Such a sequence ends with a ISB+DSB
      sequence if running on an Armv7 or later CPU.
      
      gcc:
      
      	PR target/86951
      	* config/arm/arm-protos.h (arm_emit_speculation_barrier): New
      	prototype.
      	* config/arm/arm.c (speculation_barrier_libfunc): New static
      	variable.
      	(arm_init_libfuncs): Initialize it.
      	(arm_emit_speculation_barrier): New function.
      	* config/arm/arm.md (speculation_barrier): Call
      	arm_emit_speculation_barrier for architectures that do not have 
      	DSB or ISB.
      	(speculation_barrier_insn): Only match on Armv7 or later.
      
      libgcc:
      
      	PR target/86951
      	* config/arm/lib1funcs.asm (speculation_barrier): New function.
      	* config/arm/t-arm (LIB1ASMFUNCS): Add it to list of functions
      	to build.
      
      From-SVN: r263806
      Richard Earnshaw committed
    • re PR ipa/87024 (ICE in fold_stmt_1) · 60d91c7f
      2018-08-23  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/87024
      	* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
      	calls.
      
      	* gcc.dg/pr87024.c: New testcase.
      
      From-SVN: r263805
      Richard Biener committed
    • [AArch64] Improve SVE handling of single-vector permutes · e25c95ef
      aarch64_vectorize_vec_perm_const was failing to set one_vector_p
      if the permute had only a single input.  This in turn was hiding
      a problem in the SVE TBL handling: it accepted single-vector
      variable-length permutes, but sent them through the general
      two-vector aarch64_expand_sve_vec_perm, which is only set up
      to handle constant-length permutes.
      
      2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
      	of single-vector TBLs.
      	(aarch64_vectorize_vec_perm_const): Set one_vector_p when only
      	one input is given.
      
      gcc/testsuite/
      	* gcc.dg/vect/no-vfa-vect-depend-2.c: Remove XFAIL.
      	* gcc.dg/vect/no-vfa-vect-depend-3.c: Likewise.
      	* gcc.dg/vect/pr65947-13.c: Update for vect_fold_extract_last.
      	* gcc.dg/vect/pr80631-2.c: Likewise.
      
      From-SVN: r263804
      Richard Sandiford committed