1. 21 Jun, 2019 8 commits
    • compiler: omit write barrier for assignment to *(convert(&local)) · 28b9598b
          
          Assignments to local variables don't need a write barrier. But
          currently the compiler inserts a write barrier if the LHS is a
          local variable with type converted, as *(convert(&local)). Let
          the compiler recognize this pattern and omit the write barrier.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182541
      
      From-SVN: r272550
      Ian Lance Taylor committed
    • compiler: open code string slice expressions · c9b236e5
          
          Currently a string slice expression is implemented with a runtime
          call __go_string_slice. Change it to open code it, which is more
          efficient, and allows the backend to further optimize it.
          
          Also omit the write barrier for length-only update (i.e.
          s = s[:n]).
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182540
      
      From-SVN: r272549
      Ian Lance Taylor committed
    • re PR debug/90914 (ICE in schedule_generic_params_dies_gen, at dwarf2out.c:27153) · 050e182a
      2019-06-21  Richard Biener  <rguenther@suse.de>
      
      	PR debug/90914
      	* dwarf2out.c (prune_unused_types_walk): Always consider
      	function-local extern declarations as used.
      
      	* g++.dg/debug/pr90914.C: New testcase.
      
      From-SVN: r272547
      Richard Biener committed
    • re PR tree-optimization/90913 (ICE in maybe_gen_insn, at optabs.c:7341 since r272239) · b614fca2
      2019-06-21  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90913
      	* tree-vect-loop-manip.c (vect_loop_versioning): Do not re-use
      	the scalar variant of if-conversion versioning.
      
      	* gfortran.dg/vect/pr90913.f90: New testcase.
      
      From-SVN: r272545
      Richard Biener committed
    • omp-low.c (lower_rec_simd_input_clauses): Add rvar2 argument... · 1612b1fe
      	* omp-low.c (lower_rec_simd_input_clauses): Add rvar2 argument,
      	create another "omp scan inscan exclusive" array if
      	!ctx->scan_inclusive.
      	(lower_rec_input_clauses): Handle exclusive scan inscan reductions.
      	(lower_omp_scan): Likewise.
      	* tree-vectorizer.h (struct _stmt_vec_info): Use 3-bit instead of
      	2-bit bitfield for simd_lane_access_p member.
      	* tree-vect-data-refs.c (vect_analyze_data_refs): Also handle
      	aux == (void *)-4 as simd lane access.
      	* tree-vect-stmts.c (check_scan_store): Handle exclusive scan.  Update
      	comment with permutations to show the canonical permutation order.
      	(vectorizable_scan_store): Handle exclusive scan.
      	(vectorizable_store): Call vectorizable_scan_store even for
      	STMT_VINFO_SIMD_LANE_ACCESS_P > 3.
      
      	* gcc.dg/vect/vect-simd-12.c: New test.
      	* gcc.dg/vect/vect-simd-13.c: New test.
      	* gcc.dg/vect/vect-simd-14.c: New test.
      	* gcc.dg/vect/vect-simd-15.c: New test.
      	* gcc.target/i386/sse2-vect-simd-12.c: New test.
      	* gcc.target/i386/sse2-vect-simd-13.c: New test.
      	* gcc.target/i386/sse2-vect-simd-14.c: New test.
      	* gcc.target/i386/sse2-vect-simd-15.c: New test.
      	* gcc.target/i386/avx2-vect-simd-12.c: New test.
      	* gcc.target/i386/avx2-vect-simd-13.c: New test.
      	* gcc.target/i386/avx2-vect-simd-14.c: New test.
      	* gcc.target/i386/avx2-vect-simd-15.c: New test.
      	* gcc.target/i386/avx512f-vect-simd-12.c: New test.
      	* gcc.target/i386/avx512f-vect-simd-13.c: New test.
      	* gcc.target/i386/avx512f-vect-simd-14.c: New test.
      	* gcc.target/i386/avx512bw-vect-simd-15.c: New test.
      	* g++.dg/vect/simd-6.cc: New test.
      	* g++.dg/vect/simd-7.cc: New test.
      	* g++.dg/vect/simd-8.cc: New test.
      	* g++.dg/vect/simd-9.cc: New test.
      	* c-c++-common/gomp/scan-2.c: Don't expect any diagnostics.
      
      From-SVN: r272544
      Jakub Jelinek committed
    • re PR c++/90950 (OpenMP clause handling rejecting references to incomplete types in templates) · e73fb06d
      	PR c++/90950
      	* semantics.c (finish_omp_clauses): Don't reject references to
      	incomplete types if processing_template_decl.
      
      	* g++.dg/gomp/lastprivate-1.C: New test.
      
      From-SVN: r272543
      Jakub Jelinek committed
    • tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle "omp simd array"… · 080c269b
      tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle "omp simd array" arrays with one byte elements.
      
      	* tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle
      	"omp simd array" arrays with one byte elements.
      
      	* gcc.dg/vect/vect-simd-11.c: New test.
      	* gcc.target/i386/sse2-vect-simd-11.c: New test.
      	* gcc.target/i386/avx2-vect-simd-11.c: New test.
      	* gcc.target/i386/avx512bw-vect-simd-11.c: New test.
      
      From-SVN: r272542
      Jakub Jelinek committed
    • Daily bump. · da10d7c2
      From-SVN: r272538
      GCC Administrator committed
  2. 20 Jun, 2019 28 commits
  3. 19 Jun, 2019 4 commits
    • Fix non-standard behaviour of std::istream_iterator · 638ad333
      The current implementation of istream_iterator allows the iterator to be
      reused after reaching end-of-stream, so that subsequent reads from the
      stream can succeed (e.g. if the stream state has been cleared and stream
      position changed from EOF). The P0738R2 paper clarified that the
      expected behaviour is to set the stream pointer to null after reaching
      end-of-stream, preventing further reads.
      
      This implements that requirement, and adds the new default constructor
      to std::ostream_iterator.
      
      	* include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
      	private.
      	(istream_iterator::_M_read()): Do not check stream state before
      	attempting extraction. Set stream pointer to null when extraction
      	fails (P0738R2).
      	(operator==(const istream_iterator&, const istream_iterator&)): Change
      	to be a hidden friend of istream_iterator.
      	(operator!=(const istream_iterator&, const istream_iterator&)):
      	Likewise.
      	(ostream_iterator::ostream_iterator()): Add default constructor.
      	(ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
      	addressof.
      	* testsuite/24_iterators/istream_iterator/1.cc: New test.
      	* testsuite/24_iterators/ostream_iterator/1.cc: New test.
      	* testsuite/24_iterators/ostream_iterator/70766.cc: Also check
      	constructor taking a string.
      	* testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
      	New test.
      
      From-SVN: r272491
      Jonathan Wakely committed
    • Have std::vector printer's iterator return bool for vector<bool> · 36d0dada
      Have the pretty-printer for 'std::vector<bool>' return a
      value of type 'bool' rather than an 'int'.
      
      This way, the type is clear and that can be used for better
      display and a 'gdb.Value' constructed from the returned value
      will have type 'bool' again, not e.g. 'long long' as happened
      previously (at least with GDB 8.2.1 on amd64).
      
      2019-06-19  Michael Weghorn  <m.weghorn@posteo.de>
      	    Jonathan Wakely  <jwakely@redhat.com>
      
      	PR libstdc++/90945
      	* python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
      	values of type bool for vector<bool> elements.
      	* testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
      	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
      
      Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
      
      From-SVN: r272490
      Michael Weghorn committed
    • PR libstdc++/90920 restore previous checks for empty ranges · 0fd9e848
      The change in r263433 broke the contract of the __rotate functions, by no
      longer accepting empty ranges. That means that callers which inlined the
      old version of std::rotate (without checks) that end up linking to a new
      definition of std::__rotate (also without checks) could perform a divide
      by zero and crash.
      
      This restores the old contract of the __rotate overloads.
      
      	PR libstdc++/90920 partially revert r263433
      	* include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
      	(rotate): Remove checks.
      	* testsuite/25_algorithms/rotate/90920.cc: New test.
      
      From-SVN: r272489
      Jonathan Wakely committed
    • re PR tree-optimization/90626 (fold strcmp(a, b) == 0 to zero when one string… · c6f0626b
      re PR tree-optimization/90626 (fold strcmp(a, b) == 0 to zero when one string length is exact and the other is unequal)
      
      PR tree-optimization/90626
      
      gcc/ChangeLog:
      	* tree-ssa-strlen.c (strxcmp_unequal): Fix typos.
      
      From-SVN: r272487
      Martin Sebor committed