1. 02 Aug, 2019 23 commits
  2. 01 Aug, 2019 16 commits
    • PR c++/90947 - Simple lookup table of array of strings is miscompiled · b74f15a8
      gcc/cp/ChangeLog:
      
      	PR c++/90947
      	* decl.c (reshape_init_array_1): Avoid truncating initializer
      	lists containing string literals.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/90947
      	* c-c++-common/array-1.c: New test.
      	* g++.dg/abi/mangle73.C: New test.
      	* g++.dg/cpp2a/nontype-class23.C: New test.
      	* g++.dg/init/array53.C: New test.
      
      gcc/ChangeLog:
      
      	PR c++/90947
      	* tree.c (type_initializer_zero_p): Define.
      	* tree.h (type_initializer_zero_p): New function.
      
      From-SVN: r273989
      Martin Sebor committed
    • cgraph.h (cgraph_edge::maybe_hot_p): Tweak comment. · bf321336
      	* cgraph.h (cgraph_edge::maybe_hot_p): Tweak comment.
      	* cgraph.c (cgraph_edge::maybe_hot_p): Likewise.  Remove useless test.
      	* predict.c (maybe_hot_count_p): Likewise.
      	(maybe_hot_bb_p): Tweak comment.
      	(maybe_hot_edge_p): Likewise.
      	(probably_never_executed): Likewise.  Minor tweak.
      	(probably_never_executed_bb_p): Likewise.
      	(unlikely_executed_edge_p): Likewise.
      	(probably_never_executed_edge_p): Likewise.
      	(optimize_function_for_size_p): Likewise.
      	(optimize_function_for_speed_p): Likewise.
      	(function_optimization_type): Likewise.
      	(optimize_bb_for_size_p): Likewise.
      	(optimize_bb_for_speed_p): Likewise.
      	(bb_optimization_type): Likewise.
      	(optimize_edge_for_size_p): Likewise.
      	(optimize_edge_for_speed_p): Likewise.
      	(optimize_insn_for_size_p): Likewise.
      	(optimize_insn_for_speed_p): Likewise.
      	(optimize_loop_for_size_p): Likewise.
      	(optimize_loop_for_speed_p): Likewise.
      	(optimize_loop_nest_for_speed_p): Likewise.
      	(optimize_loop_nest_for_size_p): Likewise.
      	(predictable_edge_p): Likewise.
      	(handle_missing_profiles): Minor tweak.
      
      From-SVN: r273983
      Eric Botcazou committed
    • Fix comment about use of @pcrel@got. · f7eaa84e
      2019-08-01  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/predicates.md (pcrel_external_address): Update
      	comment.
      
      From-SVN: r273982
      Michael Meissner committed
    • re PR tree-optimization/85693 (Generation of SAD (Sum of Absolute Difference) instruction) · 45230a40
      	PR target/85693
      	* config/i386/mmx.md (usadv8qi): New expander.
      
      testsuite/ChangeLog:
      
      	PR target/85693
      	* gcc.target/i386/pr85693-1.c: New test.
      
      From-SVN: r273981
      Uros Bizjak committed
    • re PR c++/90590 (enumeration value not handled in switch warning for std::ios_base::seek_dir) · ce529ffc
      PR c++/90590
      
      	* c-warn.c (c_do_switch_warnings): Suppress warning for enumerators
      	with reserved names that are in a system header.
      
      	* c-c++-common/pr90590-1.c: New test.
      	* c-c++-common/pr90590-1.h: New test.
      	* c-c++-common/pr90590-2.c: New test.
      	* c-c++-common/pr90590-2.h: New test.
      
      From-SVN: r273980
      Matthew Beliveau committed
    • mmx.md (vec_extractv2si_0): Add (r,x) alternative. · 2c726f94
      	* config/i386/mmx.md (vec_extractv2si_0): Add (r,x) alternative.
      	(*vec_extractv2si_0_zext_sse4): New insn pattern.
      	(*vec_extractv2si_0_zext): Ditto.
      	(*vec_extractv2si_1): Add (rm,x) alternative.
      	(*vec_extractv2si_1_zext): New insn pattern.
      	(*vec_extractv2si_zext_mem): Add "TARGET_MMX || TARGET_MMX_WITH_SSE"
      	insn constraint.
      
      From-SVN: r273979
      Uros Bizjak committed
    • domwalk: use gcc_sort_r · 51007dc1
      2019-08-01  Richard Biener  <rguenther@suse.de>
      
      	* domwalk.c (bb_postorder): Remove static variable.
      	(cmp_bb_postorder): Adjust.
      	(sort_bbs_postorder): Adjust and use gcc_sort_r.
      	(dom_walker::walk): Adjust.
      
      From-SVN: r273978
      Richard Biener committed
    • sort.cc: introduce gcc_sort_r · ce0454d9
      	* sort.cc (sort_r_ctx): New struct.
      	(reorder23): Make templated on context type.
      	(reorder45): Ditto.
      	(cmp1): Ditto.  Adjust signature.
      	(netsort): Ditto.
      	(mergesort): Ditto.
      	[CHECKING_P] (cmp2to3): New static function.  Use it...
      	(gcc_qsort) [CHECKING_P]: ...here.
      	(gcc_sort_r): New function.
      	* system.h (sort_r_cmp_fn): New function typedef.
      	(qsort_chk): Adjust signature.
      	(gcc_sort_r): Declare.
      	* vec.c (qsort_chk_error): Adjust.
      	(qsort_chk): Adjust.
      
      From-SVN: r273977
      Alexander Monakov committed
    • PR c++/90805 - detect narrowing in case values. · f339eb66
      	* decl.c (case_conversion): Detect narrowing in case values.
      
      	* c-c++-common/pr89888.c: Update expected dg-error.
      	* g++.dg/cpp0x/Wnarrowing17.C: New test.
      	* g++.dg/cpp0x/enum28.C: Update expected dg-error.
      
      From-SVN: r273976
      Marek Polacek committed
    • Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers. · 3a66e68a
      2019-08-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement C++20 p0202 - Add Constexpr Modifiers to Functions
      	in <algorithm> and <utility> Headers.
      	Implement C++20 p1023 - constexpr comparison operators for std::array.
      	* include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
      	copy_backward, copy_if, copy_n, equal_range, fill, find_end,
      	find_if_not, includes, is_heap, is_heap_until, is_partitioned,
      	is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
      	none_of, partition_copy, partition_point, remove, remove_if,
      	remove_copy, remove_copy_if, replace_copy, replace_copy_if,
      	reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
      	count_if, equal, find, find_first_of, find_if, for_each, generate,
      	generate_n, lexicographical_compare, merge, mismatch, replace,
      	replace_if, search, search_n, set_difference, set_intersection,
      	set_symmetric_difference, set_union, transform, unique_copy):
      	Mark constexpr.
      	* include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
      	* include/bits/predefined_ops.h (_Iter_less_val::operator(),
      	_Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
      	_Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
      	 Use const ref instead of ref arg;
      	(_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
      	__iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
      	_Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
      	_Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
      	_Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
      	__iter_comp_iter): Mark constexpr.
      	* include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
      	__search, __search_n_aux, __search_n, __find_end, find_end, all_of,
      	none_of, any_of, find_if_not, is_partitioned, partition_point,
      	__remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
      	copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
      	__unique, unique, __unique_copy, reverse_copy, rotate_copy,
      	__unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
      	__final_insertion_sort, lower_bound, __upper_bound, upper_bound,
      	__equal_range, equal_range, binary_search, __includes, includes,
      	__next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
      	replace_copy_if, __count_if, is_sorted, __is_sorted_until,
      	is_sorted_until, __is_permutation, is_permutation, for_each, find,
      	find_if, find_first_of, adjacent_find, count, count_if, search,
      	search_n, transform, replace, replace_if, generate, generate_n,
      	unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
      	set_intersection, __set_difference, set_difference,
      	__set_symmetric_difference, set_symmetric_difference):  Mark constexpr.
      	* include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
      	wrappers around __builtin_memmove and __builtin_memcmp
      	respectively;
      	(__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
      	copy, move, __copy_move_b, __copy_move_backward_a,
      	__copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
      	__fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
      	__lexicographical_compare_impl, __lexicographical_compare,
      	__lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
      	__lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
      	__mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
      	is_heap): Mark constexpr.
      	* include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
      	is_heap): Mark constexpr.
      	* include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
      	* include/std/array: Make comparison ops constexpr.
      	* include/std/utility: Make exchange constexpr.
      	* include/std/version (__cpp_lib_constexpr_algorithms): New macro.
      	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
      	* testsuite/23_containers/array/tuple_interface/
      	tuple_element_neg.cc: Adjust.
      	* testsuite/20_util/exchange/constexpr.cc: New.
      	* testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
      	* testsuite/25_algorithms/constexpr_macro.cc: New.
      	* testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
      	* testsuite/25_algorithms/all_of/constexpr.cc: New.
      	* testsuite/25_algorithms/any_of/constexpr.cc: New.
      	* testsuite/25_algorithms/binary_search/constexpr.cc: New.
      	* testsuite/25_algorithms/copy/constexpr.cc: New.
      	* testsuite/25_algorithms/copy_backward/constexpr.cc: New.
      	* testsuite/25_algorithms/copy_if/constexpr.cc: New.
      	* testsuite/25_algorithms/copy_n/constexpr.cc: New.
      	* testsuite/25_algorithms/count/constexpr.cc: New.
      	* testsuite/25_algorithms/count_if/constexpr.cc: New.
      	* testsuite/25_algorithms/equal/constexpr.cc: New.
      	* testsuite/25_algorithms/equal_range/constexpr.cc: New.
      	* testsuite/25_algorithms/fill/constexpr.cc: New.
      	* testsuite/25_algorithms/fill_n/constexpr.cc: New.
      	* testsuite/25_algorithms/find/constexpr.cc: New.
      	* testsuite/25_algorithms/find_end/constexpr.cc: New.
      	* testsuite/25_algorithms/find_first_of/constexpr.cc: New.
      	* testsuite/25_algorithms/find_if/constexpr.cc: New.
      	* testsuite/25_algorithms/find_if_not/constexpr.cc: New.
      	* testsuite/25_algorithms/for_each/constexpr.cc: New.
      	* testsuite/25_algorithms/generate/constexpr.cc: New.
      	* testsuite/25_algorithms/generate_n/constexpr.cc: New.
      	* testsuite/25_algorithms/is_heap/constexpr.cc: New.
      	* testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
      	* testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
      	* testsuite/25_algorithms/is_permutation/constexpr.cc: New.
      	* testsuite/25_algorithms/is_sorted/constexpr.cc: New.
      	* testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
      	* testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
      	* testsuite/25_algorithms/lower_bound/constexpr.cc: New.
      	* testsuite/25_algorithms/merge/constexpr.cc: New.
      	* testsuite/25_algorithms/mismatch/constexpr.cc: New.
      	* testsuite/25_algorithms/none_of/constexpr.cc: New.
      	* testsuite/25_algorithms/partition_copy/constexpr.cc: New.
      	* testsuite/25_algorithms/partition_point/constexpr.cc: New.
      	* testsuite/25_algorithms/remove/constexpr.cc: New.
      	* testsuite/25_algorithms/remove_copy/constexpr.cc: New.
      	* testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
      	* testsuite/25_algorithms/remove_if/constexpr.cc: New.
      	* testsuite/25_algorithms/replace_copy/constexpr.cc: New.
      	* testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
      	* testsuite/25_algorithms/replace_if/constexpr.cc: New.
      	* testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
      	* testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
      	* testsuite/25_algorithms/search/constexpr.cc: New.
      	* testsuite/25_algorithms/search_n/constexpr.cc: New.
      	* testsuite/25_algorithms/set_difference/constexpr.cc: New.
      	* testsuite/25_algorithms/set_intersection/constexpr.cc: New.
      	* testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
      	* testsuite/25_algorithms/set_union/constexpr.cc: New.
      	* testsuite/25_algorithms/transform/constexpr.cc: New.
      	* testsuite/25_algorithms/unique/constexpr.cc: New.
      	* testsuite/25_algorithms/unique_copy/constexpr.cc: New.
      	* testsuite/25_algorithms/upper_bound/constexpr.cc: New.
      
      From-SVN: r273975
      Edward Smith-Rowland committed
    • Fix pr89330_0.C test · dd1f6968
      Fix pr89330_0.C test by adding missing effective target shared.
      Committed as obvious.
      
         testsuite/
      	* gcc/testsuite/g++.dg/lto/pr89330_0.C: Add effective-target shared.
      
      From-SVN: r273973
      Wilco Dijkstra committed
    • tree-ssa-pre.c (has_abnormal_preds): Remove global var. · 95bbf475
      2019-08-01  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-pre.c (has_abnormal_preds): Remove global var.
      	(compute_antic): Localize it here.
      
      From-SVN: r273971
      Richard Biener committed
    • Make-lang.in (lto.install-common): Remove unnecessary slash between $(DESTDIR) and $(bindir). · 6e42c90c
      2019-08-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * Make-lang.in (lto.install-common): Remove unnecessary slash
              between $(DESTDIR) and $(bindir).
      
      From-SVN: r273969
      Bernd Edlinger committed
    • RISC-V: Fix testcase on rv64 · ee9021bc
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/riscv/attribute-10.c: Fix testcase on rv64.
      
      From-SVN: r273968
      Kito Cheng committed
    • Daily bump. · b13e3196
      From-SVN: r273960
      GCC Administrator committed
  3. 31 Jul, 2019 1 commit