1. 04 Jan, 2019 10 commits
    • Fix test failure with old Copy-On-Write std::string · 66f31224
      	* testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
      	assertion failures with old std::string ABI.
      
      From-SVN: r267577
      Jonathan Wakely committed
    • Fix bugs in filesystem::path::lexically_normal() · 73d968d9
      Using path::_List::erase(const_iterator) to remove a non-final component
      in path::lexically_normal() is a bug, because it leaves the following
      component with an incorrect _M_pos value.
      
      Instead of providing erase members that allow removing components from
      the middle, replace them with pop_back() and
      _M_erase_from(const_iterator) which only allow removing elements at the
      end. Most uses of erase are unaffected, because they only remove
      elements from the end anyway. The one use of erasure from the middle in
      lexically_normal() is replaced by calls to pop_back() and/or clearing
      the last component to leave it as an empty final filename.
      
      Also replace the "???" comment in lexically_normal() to document when
      that branch is taken.
      
      	* include/bits/fs_path.h (path::_List::erase): Replace both overloads
      	with ...
      	(path::pop_back(), path::_M_erase_from(const_iterator)): New member
      	functions that will only erase elements at the end.
      	* src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
      	(path::_List::_Impl::_M_erase_from(const_iterator)): Define.
      	(path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
      	of erase(p, end()).
      	(path::_List::pop_back()): Define.
      	(path::_List::_M_erase_from(const_iterator)): Define.
      	(path::operator/=(const path&)): Use pop_back to remove last component
      	and _M_erase_from to remove multiple components.
      	(path::_M_append(basic_string_view<value_type>)): Likewise.
      	(path::operator+=(const path&)): Likewise.
      	(path::_M_concat(basic_string_view<value_type>)): Likewise.
      	(path::remove_filename()): Likewise.
      	(path::lexically_normal()): Use _List::_Impl iterators instead of
      	path::iterator. Use pop_back to remove components from the end. Clear
      	trailing filename, instead of using erase(const_iterator) to remove
      	a non-final component.
      	* testsuite/27_io/filesystem/path/generation/normal.cc: Test
      	additional cases.
      	* testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
      
      From-SVN: r267576
      Jonathan Wakely committed
    • * gnatvsn.ads: Bump copyright year. · 2d4c371e
      From-SVN: r267575
      Eric Botcazou committed
    • Fix concatenation bug in filesystem::path · b3080217
      When erasing a trailing empty filename component, the output iterator
      was not decremented, causing the next component to be created at the
      wrong position.
      
      	* src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
      	incorrect treatment of empty filename after trailing slash.
      	* testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
      
      From-SVN: r267574
      Jonathan Wakely committed
    • Avoid spurious test failures when -fno-inline in test flags · 5db78cac
      These tests rely on inlining, so if -fno-inline is added to the compiler
      flags the tests fail. Use the predefined __NO_INLINE__ macro to detect
      that situation, and don't bother testing the move assignment.
      
      	* testsuite/21_strings/basic_string/modifiers/assign/char/
      	move_assign_optim.cc: Avoid spurious failure when -fno-inline added
      	to test flags.
      	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
      	move_assign_optim.cc: Likewise.
      
      From-SVN: r267573
      Jonathan Wakely committed
    • re PR fortran/48543 (Collapse identical strings) · a52fcfac
      2019-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/48543
          * gfortran.dg/const_chararacter_merge.f90: Actually remove.
          * gfortran.dg/merge_char_const.f90: Restore.
      
      From-SVN: r267572
      Thomas Koenig committed
    • re PR target/88594 (ICE in int_mode_for_mode, at stor-layout.c:403) · 9d3ac5e3
      	PR target/88594
      	* config/i386/i386.c (ix86_expand_divmod_libfunc): Use mode instead
      	of GET_MODE (opN) as modes of the libcall arguments.
      
      	* gcc.dg/pr88594.c: New test.
      
      From-SVN: r267571
      Jakub Jelinek committed
    • x86: relax mask register constraints · 80b23ae8
      While their use for masking is indeed restricted to %k1...%k7, use as
      "normal" insn operands also permits %k0. Remove the unnecessary
      limitations, requiring quite a few testsuite adjustments.
      
      Oddly enough some AVX512{F,DQ} test cases already check for %k[0-7],
      while others did permit {%k0} - where they get touched here anyway this
      gets fixed at the same time.
      
      From-SVN: r267570
      Jan Beulich committed
    • PR tree-optimization/88659 - ICE in maybe_warn_nonstring_arg · df161fc2
      gcc/ChangeLog:
      	* calls.c (maybe_warn_nonstring_arg): Avoid assuming maxlen is set.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/Wstringop-truncation-6.c: New test.
      
      From-SVN: r267569
      Martin Sebor committed
    • Daily bump. · 7880e173
      From-SVN: r267568
      GCC Administrator committed
  2. 03 Jan, 2019 18 commits
  3. 02 Jan, 2019 12 commits
    • gimple-fold.c (strlen_range_kind): Remove SRK_LENRANGE_2. · 84de9426
      	* gimple-fold.c (strlen_range_kind): Remove SRK_LENRANGE_2.
      	(get_range_strlen_tree): Update appropriately.
      	(get_range_strlen)
      	* gimple-fold.h (get_range_strlen): Drop unused last argument.
      
      Co-Authored-By: Jeff Law <law@redhat.com>
      
      From-SVN: r267537
      Martin Sebor committed
    • PR c++/81486 - CTAD failing with (). · fbf3e66f
      	* g++.dg/cpp1z/class-deduction60.C: New test.
      	* g++.dg/cpp1z/class-deduction61.C: New test.
      
      From-SVN: r267535
      Marek Polacek committed
    • PR c++/88631 - CTAD failing for value-initialization. · 29bb9224
      	* typeck2.c (build_functional_cast): Try deducing the template
      	arguments even if there are no arguments to deduce from.
      
      	* g++.dg/cpp1z/class-deduction59.C: New test.
      
      From-SVN: r267533
      Marek Polacek committed
    • PR c++/88612 - ICE with -Waddress-of-packed-member. · 5b81a980
      	* call.c (convert_for_arg_passing): Only give warnings with tf_warning.
      	* typeck.c (convert_for_assignment): Likewise.
      
      	* g++.dg/warn/Waddress-of-packed-member1.C: New test.
      
      From-SVN: r267532
      Marek Polacek committed
    • gimple-fold.c (gimple_fold_builtin_strlen): Use set_strlen_range rather than set_range_info. · d4bf6975
      	* gimple-fold.c (gimple_fold_builtin_strlen): Use set_strlen_range
      	rather than set_range_info.
      	* tree-ssa-strlen.c (set_strlen_range): Extracted from
      	maybe_set_strlen_range.  Handle potentially boundary crossing
      	cases more conservatively.
      	(maybe_set_strlen_range): Parts refactored into set_strlen_range.
      	Call set_strlen_range.
      	* tree-ssa-strlen.h (set_strlen_range): Add prototype.
      
      	* gcc.dg/strlenopt-36.c: Update.
      	* gcc.dg/strlenopt-45.c: Update.
      	* gcc.c-torture/execute/strlen-5.c: New test.
      	* gcc.c-torture/execute/strlen-6.c: New test.
      	* gcc.c-torture/execute/strlen-7.c: New test.
      
      Co-Authored-By: Jeff Law <law@redhat.com>
      
      From-SVN: r267531
      Martin Sebor committed
    • re PR testsuite/87304 (gcc.dg/vect/bb-slp-over-widen-1.c fails starting with r262371) · ec1faddf
      	PR testsuite/87304
      	* gcc.dg/vect/bb-slp-over-widen-1.c: Expect basic block vectorized
      	messages only on vect_hw_misalign targets.
      
      From-SVN: r267528
      Jakub Jelinek committed
    • parse.c (decode_statement): Suppress "Unclassifiable statement" error if… · f8fdc8c9
      parse.c (decode_statement): Suppress "Unclassifiable statement" error if previous error messages were emittes.
      
      2019-01-01  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	* parse.c (decode_statement):  Suppress "Unclassifiable statement"
      	error if previous error messages were emittes.
       
      2019-01-01  Steven G. Kargl  <kargl@gcc.gnu.org>
       
      	* gfortran.dg/argument_checking_7.f90: Remove run-on error message.
      	* gfortran.dg/dec_d_lines_3.f: Ditto.
      	* gfortran.dg/dec_structure_24.f90: Ditto.
      	* gfortran.dg/dec_structure_26.f90: Ditto.
      	* gfortran.dg/dec_structure_27.f90: Ditto.
      	* gfortran.dg/dec_type_print_3.f90: Ditto.
      	* gfortran.dg/derived_name_1.f90: Ditto.
      	* gfortran.dg/error_recovery_1.f90: Ditto.
      	* gfortran.dg/gomp/pr29759.f90: Ditto.
      	* gfortran.dg/pr36192.f90: Ditto.
      	* gfortran.dg/pr56007.f90: Ditto.
      	* gfortran.dg/pr56520.f90: Ditto.
      	* gfortran.dg/pr78741.f90: Ditto.
      	* gfortran.dg/print_fmt_2.f90: Ditto.
      	* gfortran.dg/select_type_20.f90: Ditto.
      
      From-SVN: r267526
      Steven G. Kargl committed
    • * es.po: Update. · aaf83eb7
      From-SVN: r267521
      Joseph Myers committed
    • re PR middle-end/88663 (internal compiler error: in check, at tree-vrp.c:188) · 03c4a945
      	PR middle-end/88663
      	* gimple-fold.c (get_range_strlen): Update prototype to no longer
      	need the flexp argument.
      	(get_range_strlen_tree): Drop flexp argument.  Drop flexp argument
      	from calls to get_range_strlen.  Update comments.  Just update
      	VAL for an unterminated const char array and let the reset of the
      	code handle it normally.  No longer try to set *flexp.  Adjust
      	return value.
      	(get_range_strlen): Update for the new get_range_strlen API.
      	(get_maxval_strlen): Similarly.
      	(gimple_fold_builtin_strlen): Handle update meaning of return value
      	from get_range_strlen.
      	* gimple-ssa-sprintf.c (get_string_length): Update for the new
      	get_range_strlen API.
      
      Co-Authored-By: Jeff Law <law@redhat.com>
      
      From-SVN: r267520
      Martin Sebor committed
    • re PR c++/86875 (ICE in tsubst_copy, at cp/pt.c:15478) · 905969f9
      	PR c++/86875
      	* g++.dg/cpp1y/lambda-generic-86875.C: New test.
      
      From-SVN: r267519
      Marek Polacek committed
    • Add more testcases for class template argument deduction of maps · b3e2dc1e
      This adds additional tests for std::map and std::multimap CTAD. The
      tests ensure that deduction works for braced-init-list of value_type
      objects, and for pairs of input iterators (with both std::pair<Key, T>
      and value_type as the iterator's value_type). This ensures deduction
      from value_type still works, as well as the non-value_type cases in LWG
      3025.
      
      Similar tests for unordered maps do not work, apparently because the
      constructor taking an initializer_list<value_type> is not usable for
      deduction, and the deduction guide taking initializer_list<pair<Key, T>>
      deduces key_type to be const. I am not addressing that.
      
      	* testsuite/23_containers/map/cons/deduction.cc: Test deduction from
      	initializer_list<value_type> and from input iterator ranges.
      	* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
      
      From-SVN: r267518
      Jonathan Wakely committed
    • re PR fortran/48543 (Collapse identical strings) · 3f11aa6a
      2019-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/48543
      	* gfortran.dg/const_chararacter_merge.f90: New test.
      
      From-SVN: r267517
      Thomas Koenig committed