1. 05 Feb, 2017 10 commits
  2. 04 Feb, 2017 7 commits
  3. 03 Feb, 2017 23 commits
    • re PR c++/78334 ([C++1z] P0127R2 related ICE: Segmentation fault) · fb07bf88
      	PR c++/78334
      
      	* g++.dg/cpp1z/nontype-auto7.C: New.
      
      From-SVN: r245174
      Jason Merrill committed
    • PR tree-optimization/79327 - wrong code at -O2 and -fprintf-return-value · f589a1ce
      PR tree-optimization/79327 - wrong code at -O2 and -fprintf-return-value
      gcc/ChangeLog:
      	* gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
      	when precision has resulted in leading zeros.
      	(format_integer): Adjust the likely counter to assume an unknown
      	argument that may be zero is non-zero.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Adjust.
      	* gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-13.c: New test.
      	* gcc/testsuite/gcc.dg/tree-ssa/pr79327-2.c: Ditto.
      
      From-SVN: r245173
      Martin Sebor committed
    • PR c++/78689 - ICE on constructor with label · 77095a6a
      gcc/
      	* tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
      	avoid copying non-taken branch.
      gcc/cp/
      	* optimize.c (maybe_clone_body): Replace omitted parameters with
      	null lvalues.
      	* class.c (build_clone): Fix logic for omitting inherited parms.
      
      From-SVN: r245172
      Jason Merrill committed
    • re PR tree-optimization/79340 (Memory leaks in tree-vect-slp.c) · ac6dbb1a
      	PR tree-optimization/79340
      	* tree-vect-loop.c (vectorizable_reduction): Release
      	vec_defs elements after safe_splicing them into other vectors.
      	Formatting fixes.
      
      From-SVN: r245171
      Jakub Jelinek committed
    • PR c++/12245 - excessive memory use · 8a87daca
      	* constexpr.c (maybe_constant_value): Fold maybe_constant_value_1
      	back in.  Don't cache constants.
      	(maybe_constant_init): Don't cache constants.
      
      From-SVN: r245169
      Jason Merrill committed
    • PR c++/79294 - ICE with invalid template argument · 99be38ec
      	* pt.c (convert_nontype_argument_function): Check value-dependence.
      	(convert_nontype_argument): Don't check it here for function ptrs.
      
      From-SVN: r245168
      Jason Merrill committed
    • PR libstdc++/66145 ensure new ABI for ios::failure tests · 10613537
      	PR libstdc++/66145
      	* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Restore ABI override
      	so new ios::failure can be caught even when old ABI is the default.
      	* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
      	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
      	exceptions_failbit.cc: Likewise.
      	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
      	exceptions_failbit.cc: Likewise.
      	* testsuite/27_io/basic_istream/extractors_other/char/
      	exceptions_null.cc: Likewise.
      	* testsuite/27_io/basic_istream/extractors_other/wchar_t/
      	exceptions_null.cc: Likewise.
      	* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
      	* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
      	* testsuite/27_io/basic_ostream/inserters_other/char/
      	exceptions_null.cc: Likewise.
      	* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
      	exceptions_null.cc: Likewise.
      	* testsuite/27_io/ios_base/storage/2.cc: Likewise.
      
      From-SVN: r245167
      Jonathan Wakely committed
    • re PR tree-optimization/79327 (wrong code at -O2 and -fprintf-return-value) · 5b00f9d2
      	PR tree-optimization/79327
      	* gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
      	true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
      	dirtype.
      	(format_integer): Use wide_int_to_tree instead of build_int_cst
      	+ to_?hwi.  If argmin is NULL, just set argmin and argmax to
      	TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
      	of shortest and longest sequence.
      
      	* gcc.dg/tree-ssa/pr79327.c: New test.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
      	(test_sprintf_chk_hh_nonconst): Don't expect 2 bogus warnings.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c
      	(test_sprintf_chk_range_schar): Adjust dg-message.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-12.c: New test.
      	* gcc.c-torture/execute/pr79327.c: New test.
      
      Co-Authored-By: Martin Sebor <msebor@redhat.com>
      
      From-SVN: r245166
      Jakub Jelinek committed
    • PR libstdc++/60936 reduce coupling between objects in libstdc++.a · b333e8eb
      Move explicit instantiation definitions for string I/O functions into
      their own files so that iostream and locale definitions are not needed
      for uses of strings without I/O. Move functions for throwing C++11
      exceptions into the individual files defining the exception types, so
      that using any of the functions from functexcept.cc doesn't pull in
      large pieces of the C++11 library. Finally, avoid using __int_to_char in
      snprintf_lite.cc to avoid pulling in locale-inst.cc for one function.
      
      	PR libstdc++/60936
      	* src/c++11/Makefile.am: Add new files.
      	* src/c++11/Makefile.in: Regenerate.
      	* src/c++11/cow-string-inst.cc [!_GLIBCXX_USE_CXX11_ABI]
      	(operator<<, operator>>, getline): Move explicit instantiations to ...
      	* src/c++11/cow-string-io-inst.cc: ... new file.
      	* src/c++11/cow-wstring-inst.cc [!_GLIBCXX_USE_CXX11_ABI]
      	(operator<<, operator>>, getline): Move explicit instantiations to ...
      	* src/c++11/cow-wstring-io-inst.cc: ... new file.
      	* src/c++11/functexcept.cc (__throw_ios_failure, __throw_system_error)
      	(__throw_future_error, __throw_bad_function_call):
      	(__throw_regex_error): Move functions for C++11 exceptions to the
      	files that define the exception types.
      	* src/c++11/functional.cc (__throw_bad_function_call): Move here.
      	* src/c++11/future.cc (__throw_future_error): Likewise.
      	* src/c++11/ios.cc (__throw_ios_failure): Likewise.
      	* src/c++11/regex.cc (__throw_regex_error): Likewise.
      	* src/c++11/snprintf_lite.cc (__concat_size_t): Print decimal
      	representation directly instead of calling __int_to_char.
      	* src/c++11/sso_string.cc (__sso_string): New file for definition
      	of __sso_string type.
      	* src/c++11/string-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for
      	explicit instantiations of narrow string I/O functions.
      	* src/c++11/system_error.cc (__throw_system_error): Move here.
      	(__sso_string): Move to new file.
      	* src/c++11/wstring-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for
      	explicit instantiations of wide string I/O functions.
      	* src/c++98/misc-inst.cc [_GLIBCXX_USE_CXX11_ABI] (operator<<)
      	(operator>>, getline): Remove explicit instantiations from here.
      
      From-SVN: r245162
      Jonathan Wakely committed
    • i386.c (dimode_scalar_chain::convert_reg): Use pextrd for TARGET_SSE4_1 when creating scalar copy. · d5d9703a
      	* config/i386/i386.c (dimode_scalar_chain::convert_reg):
      	Use pextrd for TARGET_SSE4_1 when creating scalar copy.
      
      From-SVN: r245161
      Uros Bizjak committed
    • re PR target/78862 (tile*: ICE with -fstack-protetor-strong) · 86010a08
      PR target/78862
      * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
      after initial stackframe link reg save.
      * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
      
      From-SVN: r245159
      Walter Lee committed
    • MAINTAINERS (Write After Approval): Add myself. · d9327911
      2017-02-03  Doug Gilmore <Doug.Gilmore@imgtec.com>
      
          * MAINTAINERS (Write After Approval): Add myself.
      
      From-SVN: r245158
      Doug Gilmore committed
    • re PR target/79354 (-mcpu=power8 -O2 generates power9 instruction on powerpc64le-linux) · 437f0a81
      	PR target/79354
      	* config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
      	wu for stxssp alternative.
      
      	* gcc.target/powerpc/pr79354.c: New test.
      	* gcc.c-torture/execute/pr79354.c: New test.
      
      From-SVN: r245157
      Jakub Jelinek committed
    • PR tree-optimization/79352 - -fprintf-return-value doesn't handle flexible-like… · 3f343040
      PR tree-optimization/79352 - -fprintf-return-value doesn't handle flexible-like array members properly
      
      gcc/ChangeLog:
      
      	PR tree-optimization/79352
      	* gimple-fold.c (get_range_strlen): Add argument.
      	(get_range_strlen): Change return type to bool.
      	(get_maxval_strlen): Pass in a dummy argument.
      	* gimple-fold.h (get_range_strlen): Change return type to bool.
      	* gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
      	* tree.h (array_at_struct_end_p): Add argument.
      	* tree.c (array_at_struct_end_p): Handle it.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/79352
      	* gcc.dg/tree-ssa/pr79352.c: New test.
      
      From-SVN: r245156
      Martin Sebor committed
    • Simplify creation of target_clones (PR lto/66295) · 46a2ab58
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	PR lto/66295
      	* multiple_target.c (create_dispatcher_calls): Redirect edge
      	from a caller of a dispatcher.
      	(expand_target_clones): Make the clones local.
      	(ipa_target_clone): Do both target clones and resolvers.
      	(ipa_dispatcher_calls): Remove the pass.
      	(pass_dispatcher_calls::gate): Likewise.
      	(make_pass_dispatcher_calls): Likewise.
      	* passes.def (pass_target_clone): Put as very first IPA early
      	pass.
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	PR lto/66295
      	* gcc.target/i386/mvc9.c: New test.
      
      From-SVN: r245155
      Martin Liska committed
    • Bail out binds_to_current_def_p for ifunc functions. · 31a31c9d
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (symtab_node::binds_to_current_def_p): Bail out
      	in case of a function with ifunc attribute.
      
      From-SVN: r245154
      Martin Liska committed
    • IPA: enhance dump output · 9e57787b
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	* cgraph.c (cgraph_node::dump): Dump function version info.
      	* symtab.c (symtab_node::dump_base): Add missing new line.
      
      From-SVN: r245153
      Martin Liska committed
    • re PR rtl-optimization/78241 (wrong code with -funroll-loops) · baa2d1cd
      	PR rtl-optimization/78241
      	* loop-unroll.c (unroll_loop_runtime_iterations): Don't adjust 'niter', but
      	emit initial peel copy if niter expr is not reliable.
      
      From-SVN: r245152
      Pat Haugen committed
    • tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function. · 30c6ec2f
      	* tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
      	(ifcombine_ifandif): Use it.
      	* gcc.dg/tree-ssa/ssa-ifcombine-1.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-2.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-3.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-4.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-5.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-6.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-7.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-8.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-9.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-10.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-11.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-12.c: Check for no profile mismatches.
      	* gcc.dg/tree-ssa/ssa-ifcombine-13.c: Check for no profile mismatches.
      
      From-SVN: r245151
      Jan Hubicka committed
    • re PR sanitizer/78663 (Hundreds of asan failures on x86_64-apple-darwin10 at r243019) · 778e0ac3
      	PR sanitizer/78663
      	* sanitizer_common/sanitizer_mac.cc: Cherry-pick upstream r293992.
      	* sanitizer_common/sanitizer_platform_interceptors.h: Likewise.
      
      From-SVN: r245149
      Maxim Ostapenko committed
    • Document default value for use-after-scope-direct-emission-threshold · 5dd5e204
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	* doc/invoke.texi: Document default value for
      	use-after-scope-direct-emission-threshold.
      
      From-SVN: r245147
      Martin Liska committed
    • Fix memory leaks in gimple-ssa-sprintf.c (PR tree-optimization/79339). · 0a95c7e2
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	PR tree-optimization/79339
      	* gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
      	(format_floating): Likewise.
      
      From-SVN: r245146
      Martin Liska committed
    • Fix memory leaks in IPA CP (PR ipa/79337). · e806796d
      2017-02-03  Martin Liska  <mliska@suse.cz>
      
      	PR ipa/79337
      	* ipa-prop.c (ipa_node_params_t::insert): Remove current
      	implementation.
      	(ipa_node_params_t::remove): Likewise.
      	* ipa-prop.h (ipa_node_params::ipa_node_params): Make default
      	initialization from removed ipa_node_params_t::insert.
      	(ipa_node_params::~ipa_node_params): Move from removed
      	ipa_node_params_t::release.
      	* symbol-summary.h (symbol_summary::m_released): New member.
      	Do not release a summary twice.  Do not allow to call finalizer
      	for types of a summary that live in GGC memory.
      
      From-SVN: r245145
      Martin Liska committed