1. 24 Aug, 2018 5 commits
    • 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
  2. 23 Aug, 2018 24 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
    • Fix aarch64_evpc_tbl guard (PR 85910) · 4ec8bb67
      This patch fixes a typo in aarch64_expand_vec_perm_const_1 that I
      introduced as part of the SVE changes.  I don't know of any cases in
      which it has any practical effect, since we'll eventually try to use
      TBL as a variable permute instead.  Having the code is still an
      important part of defining the interface properly and so we shouldn't
      simply drop it.
      
      2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR target/85910
      	* config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
      	aarch64_evpc_tbl guard.
      
      From-SVN: r263803
      Richard Sandiford committed
    • Signed zero for {max,min}val intrinsics · 9c44db9f
      The Fortran standard specifies (e.g. F2018 7.4.3.2) that intrinsic
      procedures shall treat positive and negative real zero as equivalent,
      unless it is explicitly specified otherwise.  For {max,min}val there
      is no such explicit mention.  Thus, remove code to handle signed
      zeros.
      
      2018-08-23  Janne Blomqvist  <blomqvist.janne@gmail.com>
      
      	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
      	HONOR_SIGNED_ZEROS checks.
      
      From-SVN: r263802
      Janne Blomqvist committed
    • Remove C++14-isms from C++11 tests · 0aa2934a
      	* testsuite/20_util/reference_wrapper/lwg2993.cc: Fix C++11 test to
      	not use C++14 feature.
      	* testsuite/23_containers/list/68222_neg.cc: Likewise.
      
      From-SVN: r263801
      Jonathan Wakely committed
    • Skip tests that depend on the cxx11 std::string · 75224273
      	* testsuite/21_strings/basic_string/init-list.cc:
      	Require cxx11-abi.
      	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
      	Likewise.
      	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
      	Likewise.
      
      From-SVN: r263800
      Jonathan Wakely committed
    • re PR fortran/86863 ([OOP][F2008] type-bound module procedure name not recognized) · 6ab6c0c3
      2017-08-23  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/86863
      	* resolve.c (resolve_typebound_call): If the TBP is not marked
      	as a subroutine, check the specific symbol.
      
      2017-08-23  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/86863
      	* gfortran.dg/submodule_32.f08: New test.
      
      From-SVN: r263799
      Paul Thomas committed
    • Daily bump. · ba7a2ad8
      From-SVN: r263798
      GCC Administrator committed
  3. 22 Aug, 2018 11 commits
    • tree-ssa-dse.c (compute_trims): Avoid folding away undefined behaviour. · 36d2d101
      	* tree-ssa-dse.c (compute_trims): Avoid folding away undefined
      	behaviour.
      
      From-SVN: r263793
      Bernd Edlinger committed
    • Fix tests that fail in C++98 mode · f73a5316
      	* testsuite/23_containers/deque/capacity/max_size.cc: Fix test for
      	C++98 mode.
      	* testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise.
      	* testsuite/23_containers/list/modifiers/assign/1.cc: Likewise.
      	* testsuite/23_containers/vector/bool/modifiers/assign/1.cc: Likewise.
      	* testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
      	* testsuite/23_containers/vector/modifiers/assign/1.cc: Likewise.
      
      From-SVN: r263792
      Jonathan Wakely committed
    • PR libstdc++/87061 remove pmr type aliases for COW strings · 1bc7a28f
      The pmr aliases for basic_string and match_results are incompatible with
      the gcc4-compatible ABI because the Copy-On-Write basic_string class
      doesn't support C++11 allocators.
      
      	PR libstdc++/87061
      	* include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
      	(experimental::pmr::match_results, experimental::pmr::cmatch)
      	(experimental::pmr::smatch, experimental::pmr::wcmatch)
      	(experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
      	because COW strings don't support C++11 allocator model.
      	* include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
      	(experimental::pmr::basic_string, experimental::pmr::string)
      	(experimental::pmr::u16string, experimental::pmr::u32string)
      	(experimental::pmr::wstring): Likewise.
      	* include/std/regex [!_GLIBCXX_USE_CXX11_ABI] (pmr::match_results)
      	(pmr::cmatch, pmr::smatch, pmr::wcmatch, pmr::wsmatch): Likewise.
      	* include/std/string [!_GLIBCXX_USE_CXX11_ABI] (pmr::basic_string)
      	(pmr::string, pmr::u16string, pmr::u32string, pmr::wstring): Likewise.
      	* testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Require
      	cxx11-abi.
      	* testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
      
      From-SVN: r263791
      Jonathan Wakely committed
    • PR libstdc++/78448 limit vector::max_size and deque::max_size · af55b3af
      The container requirements imply that max_size() can't exceed the
      maximum value of the container's difference_type. Enforce this for
      std::vector and std::deque, and add checks to ensure the container
      doesn't grow larger than that.
      
      	PR libstdc++/78448
      	* include/bits/deque.tcc (deque::_M_range_initialize): Use
      	_S_check_init_len to check size.
      	(deque::_M_push_back_aux, deque::_M_push_front_aux): Throw length
      	error if size would exceed max_size().
      	* include/bits/stl_deque.h (_Deque_base::size_type): Remove typedef.
      	(_Deque_base(_Deque_base&&, const allocator_type&, size_t)): Use
      	size_t instead of size_type.
      	(deq(size_type, const allocator_type&)
      	(deq(size_type, const value_type&, const allocator_type&)
      	(deque::_M_initialize_dispatch): Use _S_check_init_len to check size.
      	(deque::max_size): Call _S_max_size.
      	(deque::_S_check_init_len, deque::_S_max_size): New functions.
      	* include/bits/stl_vector.h (vector(size_type, const allocator_type&))
      	(vector(size_type, const value_type&, const allocator_type&))
      	(vector::_M_initialize_dispatch, vector::_M_range_initialize): Use
      	_S_check_init_len to check size.
      	(vector::max_size): Call _S_max_size.
      	(vector::_M_check_len): Prevent max from being expanded as a
      	function-like macro.
      	(vector::_S_check_init_len, vector::_S_max_size): New functions.
      	* include/bits/vector.tcc (vector::_M_assign_aux): Use
      	_S_check_init_len to check size.
      	* testsuite/23_containers/deque/capacity/max_size.cc: New test.
      	* testsuite/23_containers/vector/capacity/max_size.cc: New test.
      
      From-SVN: r263789
      Jonathan Wakely committed
    • gfortran.texi: Mention that asynchronous I/O does not work on systems which lack condition... · 2532f0f5
      2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	* gfortran.texi: Mention that asynchronous I/O does
      	not work on systems which lack condition variables, such
      	as AIX.
      
      2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	* async.h: Set ASYNC_IO to zero if _AIX is defined.
      	(struct adv_cond): If ASYNC_IO is zero, the struct has no members.
      	(async_unit): If ASYNC_IO is zero, remove unneeded members.
      
      From-SVN: r263788
      Thomas Koenig committed
    • re PR fortran/86935 (Bad locus in ASSOCIATE statement) · bcddf743
      fix PR 86935
      
      2018-08-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/86935
      	* match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
      	statement.
      
      2018-08-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/86935
      	* gfortran.dg/associate_3.f90: Update error message.
      	* gfortran.dg/associate_39.f90: New test case.
      
      From-SVN: r263787
      Janus Weil committed
    • re PR libstdc++/68222 (_Safe_iterator provides operators the wrapped iterator… · e9afbed0
      re PR libstdc++/68222 (_Safe_iterator provides operators the wrapped iterator can't actually support)
      
      2018-08-22  François Dumont  <fdumont@gcc.gnu.org>
      
      	PR libstdc++/68222
      	* include/debug/safe_iterator.h
      	(_Safe_iterator<_It, _Sq, _Cat>): Add category template parameter.
      	(_Safe_iterator<>::_Const_iterator): Remove.
      	(_Safe_iterator<>::_IsConstant): New.
      	(_Safe_iterator<>::_OtherIterator): New.
      	(_Safe_iterator<_It, _Sq, _Cat>::_Safe_iterator<_MutIte>(
      	const _Safe_iterator<_MutIte, _Sq, _Cat>&)): Add _IsConstant::__value in
      	__gnu_cxx::__enable_if condition.
      	(_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to): New.
      	(_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_from_begin): New.
      	(_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to_end): New.
      	(_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>): New.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator--()): Move...
      	(_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
      	::operator--()): ...here.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator--(int)): Move...
      	(_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
      	::operator--(int)): ...here.
      	(_Safe_iterator<_It, _Sq, _Cat>::_M_decrementable()): Move...
      	(_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
      	::_M_decrementable()): ...here.
      	(_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>): New.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator[](const difference_type&)):
      	Move...
      	(_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
      	::operator[](const difference_type&)): ...here.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator+=(const difference_type&)):
      	Move...
      	(_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
      	::operator+=(const difference_type&)): ...here.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator+(const difference_type&)):
      	Move...
      	(_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
      	::operator+(const difference_type&)): ...here.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator-=(const difference_type&)):
      	Move...
      	(_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
      	::operator-=(const difference_type&)): ...here.
      	(_Safe_iterator<_It, _Sq, _Cat>::operator-(const difference_type&)):
      	Move...
      	(_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
      	::operator-(const difference_type&)): ...here.
      	(operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)):
      	Constraint to random access iterators.
      	(operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
      	Likewise.
      	(operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
      	(operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
      	Likewise.
      	(operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
      	(operator+(const difference_type&, const _Safe_iterator<>&)): Likewise.
      	(__check_dereferenceable(const _Safe_iterator<>&)): Remove.
      	(__get_distance): Remove.
      	(__get_distance_from_begin): Remove.
      	(__get_distance_to_end): Remove.
      	(struct __is_safe_random_iterator<_Safe_iterator<>>): Remove partial
      	specialization.
      	(__base(const _Safe_iterator<>&, std::input_iterator_tag)): Remove.
      	(__base(const _Safe_iterator<>&, std::random_access_iterator_tag)): Remove.
      	(__base(const _Safe_iterator<>&)): Constraint to random access iterator.
      	* include/debug/safe_iterator.tcc
      	(_Safe_iterator<>::_M_get_distance_from_begin()): New.
      	(_Safe_iterator<>::_M_get_distance_to_end()): New.
      	(_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator<>&)): New.
      	(_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
      	::_M_valid_range): New.
      	* include/debug/safe_local_iterator.h
      	(_Safe_local_iterator<>::_Const_local_iterator): Remove.
      	(_Safe_local_iterator<>::_IsConstant): New.
      	(_Safe_local_iterator<>::_OtherIterator): New.
      	(_Safe_local_iterator<_It, _Cont>::_Safe_local_iterator<_MutIte, _Cont>(
      	const _Safe_local_iterator<_MutIte, _Seq>&)): Add _IsConstant::__value
      	in __gnu_cxx::__enable_if condition. If singular compare base iterator
      	with _MutIte rather than _It.
      	(_Safe_local_iterator<>::_S_constant): Make constexpr.
      	(_Safe_local_iterator<>::_M_get_distance_to): New.
      	(__check_dereferenceable(const _Safe_local_iterator<>&)): Remove.
      	(__get_distance(const _Safe_local_iterator<>&,
      	const _Safe_local_iterator<>&, std::input_iterator_tag)): Remove.
      	(__valid_range(const _Safe_local_iterator<>&,
      	const _Safe_local_iterator<>&)): New.
      	* include/debug/safe_local_iterator.tcc
      	(_Safe_local_iterator<>::_M_get_distance_to): New.
      	* include/debug/deque (std::__debug::deque<>): Add
      	::__gnu_debug::_Safe_iterator<> friend declaration.
      	* include/debug/forward_list (std::__debug::forward_list<>): Likewise.
      	* include/debug/list (std::__debug::list<>): Likewise.
      	* include/debug/map.h (std::__debug::map<>): Likewise.
      	* include/debug/multimap.h (std::__debug::multimap<>): Likewise.
      	* include/debug/set.h (std::__debug::set<>): Likewise.
      	* include/debug/multiset.h (std::__debug::multiset<>): Likewise.
      	* include/debug/string (std::__debug::basic_string<>): Likewise.
      	* include/debug/unordered_map (std::__debug::unordered_map<>): Likewise
      	and add ::__gnu_debug::_Safe_local_iterator<> friend declaration.
      	(std::__debug::unordered_multimap<>): Likewise.
      	* include/debug/unordered_set (std::__debug::unordered_set<>): Likewise.
      	(std::__debug::unordered_multiset<>): Likewise.
      	* include/debug/formatter.h: Adapt.
      	* include/debug/helper_functions.h
      	(__gnu_debug::_Safe_local_iterator<>): Add declaration.
      	(__get_distance<_Ite>(_Ite, _Ite, std::random_access_iterator_tag):
      	Pass parameter by copy.
      	(__get_distance<_Ite>(_Ite, _Ite, std::input_iterator_tag): Likewise.
      	(__get_distance<_Ite>(_Ite, _Ite): Likewise.
      	(__valid_range_aux<_Integral>): Pass _Integral by copy.
      	(__valid_range<_InputIterator>): Pass _InputIterator by copy.
      	(__valid_range<>(const _Safe_iterator<>&,
      	const _Safe_iterator<>&, typename _Distance_traits<>::__type&)):
      	Declare.
      	(__valid_range(const _Safe_local_iterator<>&,
      	const _Safe_local_iterator<>&, typename _Distance_traits<>::__type&)):
      	Declare.
      	(__valid_range<>(const _Safe_iterator<>&, const _Safe_iterator<>&)):
      	Declare.
      	(__valid_range(const _Safe_local_iterator<>&, const _Safe_local_iterator<>&)):
      	Declare.
      	(__can_advance): Adapt.
      	(struct __is_safe_random_iterator<>): Remove.
      	(struct _SIter_base<>): Remove.
      	* include/debug/functions.h: Include <bits/stl_iterator.h>.
      	(__check_dereferenceable): Remove.
      	(__foreign_iterator_aux4, __foreign_iterator_aux3): Adapt.
      	(__foreign_iterator_aux2, __foreign_iterator_aux): Adapt.
      	(__foreign_iterator): Adapt.
      	* include/debug/stl_iterator.h
      	(__is_safe_random_iterator<std::reverse_iterator<>>): Remove.
      	(__base(const std::reverse_iterator<_Safe_iterator<_It, _Sq>)):
      	Constraint for random access iterators.
      	(__niter_base): Adapt.
      	* testsuite/util/testsuite_containers.h:
      	Include <bits/boost_concept_check.h>.
      	(iterator_concept_checks<_It, _Mutable, _Category>): New.
      	(citerator<_Cont>::forward_members::forward_members()): Instantiate
      	latter for container iterator and const_iterator.
      	* testsuite/23_containers/list/68222_neg.cc: New.
      	* testsuite/23_containers/vector/cons/destructible_debug_neg.cc: Adapt
      	line number.
      	* testsuite/23_containers/unordered_set/debug/debug_functions.cc:
      	(test01): Remove.
      	* testsuite/23_containers/vector/debug/debug_functions.cc (test01):
      	Remove.
      
      From-SVN: r263786
      François Dumont committed
    • module.c (load_generic_interfaces): Move call to find_symbol() so that only… · 66f32b0e
      module.c (load_generic_interfaces): Move call to find_symbol() so that only occurs if actually needed.
      
      2018-08-22  Andrew Benson  <abensonca@gmail.com>
      
              * module.c (load_generic_interfaces): Move call to find_symbol()
              so that only occurs if actually needed.
      
      From-SVN: r263784
      Andrew Benson committed
    • Update write after approval list · fe26fd66
      2018-08-22  Andrew Benson  <abensonca@gmail.com>
      
              * MAINTAINERS: Add self to write after approval list.
      
      From-SVN: r263783
      Andrew Benson committed
    • re PR fortran/86888 ([F08] allocatable components of indirectly recursive type) · 00cad178
      fix PR 86888
      
      2018-08-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/86888
      	* decl.c (gfc_match_data_decl): Allow allocatable components of
      	indirectly recursive type.
      	* resolve.c (resolve_component): Remove two errors messages ...
      	(resolve_fl_derived): ... and replace them by a new one.
      
      2018-08-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/86888
      	* gfortran.dg/alloc_comp_basics_6.f90: Update an error message and add
      	an additional case.
      	* gfortran.dg/alloc_comp_basics_7.f90: New test case.
      	* gfortran.dg/class_17.f03: Update error message.
      	* gfortran.dg/class_55.f90: Ditto.
      	* gfortran.dg/dtio_11.f90: Update error messages.
      	* gfortran.dg/implicit_actual.f90: Add an error message.
      	* gfortran.dg/typebound_proc_12.f90: Update error message.
      
      From-SVN: r263782
      Janus Weil committed
    • PR middle-end/87052 - STRING_CST printing incomplete in Gimple dumps · b56b0763
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/87052
      	* gcc.dg/pr87052.c: New test.
      	* gcc.dg/tree-ssa/dump-3.c: Adjust.
      
      gcc/ChangeLog:
      
      	PR middle-end/87052
      	* tree-pretty-print.c (pretty_print_string): Add argument.
      	(dump_generic_node): Call to pretty_print_string with string size.
      
      From-SVN: r263781
      Martin Sebor committed