PR tree-ssa/79347
* cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
ELSE_PROB.
* cfgloopmanip.h (loop_version): Update prototype.
* modulo-sched.c (sms_schedule): Update call of loop_version.
* tree-if-conv.c(version_loop_for_if_conversion): Likewise.
* tree-parloops.c (gen_parallel_loop): Likewise.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
* tree-ssa-loop-split.c (split_loop): Likewise.
* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
* tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
* gcc.dg/tree-ssa/ifc-10.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-11.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-12.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-20040816-1.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-20040816-2.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-5.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-8.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-9.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-cd.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr56541.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr68583.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr69489-1.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr69489-2.c: Match for profile mismatches.
From-SVN: r245196
PR bootstrap/78985
* config/s390/s390.c (s390_gimplify_va_arg): Initialize local
variable to NULL.
(print_operand_address): Initialize a struct to zero.
From-SVN: r245195
gcc/fortran/ChangeLog:
2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79344
* trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
the temporary, when a new object was created for the temporary. Not
when it is just an alias to an existing object.
gcc/testsuite/ChangeLog:
2017-02-04 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79344
* gfortran.dg/allocate_with_source_24.f90: New test.
From-SVN: r245194
gcc/fortran/ChangeLog:
2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79335
* trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
attributes before using them.
From-SVN: r245193
gcc/fortran/ChangeLog:
2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/78958
* trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
component of unlimited polymorphic objects when source-allocating.
From-SVN: r245192
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
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
* pt.c (convert_nontype_argument_function): Check value-dependence.
(convert_nontype_argument): Don't check it here for function ptrs.
From-SVN: r245168
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
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
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
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
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
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
* 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
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
gcc/testsuite/ChangeLog:
PR middle-end/79275
* gcc.dg/tree-ssa/builtin-sprintf-warn-11.c: New test.
* gcc.dg/tree-ssa/pr79275.c: New test.
gcc/ChangeLog:
PR middle-end/79275
* gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
(format_string): Tighten up the range of output for non-constant
strings and correct the expected range for wide non-constant strings.
From-SVN: r245142
gcc/ChangeLog:
* doc/invoke.texi (-fdump-rtl-): Remove pass-specific options from
index.
(-fdump-tree-@var): Add to index and document how to come up
with pass-specific option and dump file names.
(-fdump-passes): Clarify where to look for output.
From-SVN: r245136
PR middle-end/77445
* gcc.dg/tree-ssa/pr77445-2.c: Update testcase to check that all
threading is done.
* tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
statistics of the analyzed path; allow threading for speed when
any of BBs along the path are optimized for speed.
From-SVN: r245135