1. 15 Apr, 2016 21 commits
  2. 14 Apr, 2016 15 commits
  3. 13 Apr, 2016 4 commits
    • PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements · 342fac95
      PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
      PR c++/70019 - VLA size overflow not detected
      PR c++/70588 - SIGBUS on a VLA larger than SIZE_MAX / 2
      
      gcc/testsuite/ChangeLog:
      2016-04-13  Martin Sebor  <msebor@redhat.com>
      
              PR c++/69517
              PR c++/70019
              PR c++/70588
              * c-c++-common/ubsan/vla-1.c (main): Catch exceptions.
              * g++.dg/cpp1y/vla11.C: New test.
              * g++.dg/cpp1y/vla12.C: New test.
              * g++.dg/cpp1y/vla13.C: New test.
              * g++.dg/cpp1y/vla14.C: New test.
              * g++.dg/cpp1y/vla3.C: Restore deleted test.
              * gcc/testsuite/g++.dg/init/array24.C: Fully brace VLA initializer.
              * g++.dg/ubsan/vla-1.C: Disable exceptions.
      
      gcc/cp/ChangeLog:
      2016-04-13  Martin Sebor  <msebor@redhat.com>
      
              PR c++/69517
              PR c++/70019
              PR c++/70588
              * cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
              functions.
              * decl.c (check_initializer, cp_finish_decl): Call them.
              (reshape_init_r): Reject incompletely braced intializer-lists
              for VLAs.
              * init.c (throw_bad_array_length, build_vla_check)
              (build_vla_size_check, build_vla_init_check): Define new functions.
              * typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
              to detect a VLA.
              (store_init_value): Same.
      
      gcc/doc/ChangeLog:
      2016-04-13  Martin Sebor  <msebor@redhat.com>
      
              PR c++/69517
              PR c++/70019
              PR c++/70588
              * extend.texi (Variable Length): Document C++ specifics.
      
      libstdc++-v3/ChangeLog:
      2016-04-13  Martin Sebor  <msebor@redhat.com>
      
              PR c++/69517
              * testsuite/25_algorithms/rotate/moveable2.cc: Make sure VLA
             upper bound is positive.
      
      From-SVN: r234966
      Martin Sebor committed
    • Adjust for new empty class parameter passing ABI. · a6297ab5
      	* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES,
      	_GLIBCXX_END_NAMESPACE_EMPTY_TYPES, _GLIBCXX_ABI_TAG_EMPTY): Define.
      	* include/bits/hashtable.h (_Hashtable::_M_emplace): Change signatures
      	of functions taking empty structs by value. Add a template parameter
      	to overloads without hints. Rename overloads with hints to
      	_M_emplace_hint.
      	(_Hashtable::_M_erase(true_type, const_iterator),
      	_Hashtable::_M_erase(false_type, const_iterator)): Change signatures
      	by reordering parameters.
      	* include/bits/hashtable_policy.h (_Insert::insert): Adjust to call
      	_M_emplace_hint instead of _M_emplace.
      	* include/bits/shared_ptr.h (shared_ptr(_Tp1*, _Deleter, _Alloc),
      	shared_ptr(nullptr_t, _Deleter, _Alloc)): Use _GLIBCXX_ABI_TAG_EMPTY.
      	* include/bits/shared_ptr_base.h (_Sp_counted_deleter, __shared_count,
      	__shared_ptr): Likewise.
      	* include/bits/stl_algo.h (replace_if): Likewise.
      	* include/bits/stl_pair.h (piecewise_construct_t,
      	piecewise_construct): Use _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES.
      	* include/bits/uses_allocator.h (allocator_arg_t, allocator_arg,
      	__uses_alloc0): Likewise.
      	* include/ext/pb_ds/assoc_container.hpp (basic_hash_table): Likewise.
      	* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
      	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
      	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
      	* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
      	* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
      	* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
      
      From-SVN: r234964
      Jonathan Wakely committed
    • re PR c++/70641 (ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed) · d93c452f
      	PR c++/70641
      	* ipa-pure-const.c (pass_nothrow::execute): Call maybe_clean_eh_stmt
      	on all recursive call stmts.  Return TODO_cleanup_cfg if any dead
      	eh edges have been purged.
      
      	* g++.dg/opt/pr70641.C: New test.
      
      From-SVN: r234962
      Jakub Jelinek committed