2017-04-24 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
* tree-ssa-sccvn.c (print_scc): Print SCC size.
(extract_and_process_scc_for_name): Never fail but drop SCC to varying.
(DFS): Adjust and never fail.
(sccvn_dom_walker::fail): Remove.
(sccvn_dom_walker::before_dom_children): Adjust.
(run_scc_vn): Likewise and never fail.
* tree-ssa-pre.c (pass_pre::execute): Adjust.
(pass_fre::execute): Likewise.
From-SVN: r247092
2017-04-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/79725
* tree-ssa-sink.c (statement_sink_location): Return whether
failure reason was zero uses. Move that check later.
(sink_code_in_bb): Deal with zero uses by removing the stmt
if possible.
* gcc.dg/tree-ssa/ssa-sink-15.c: New testcase.
From-SVN: r247091
2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/80484
* io.c (format_lex): Check for '/' and set token to FMT_SLASH.
(check_format): Move FMT_DT checking code to data_desc section.
* module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
PR fortran/80484
* gfortran.dg/dtio_29.f03: New test.
From-SVN: r247084
2017-04-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/80121
* trans-types.c (gfc_conv_procedure_call): Deallocate the components
of allocatable intent(out) arguments.
2017-04-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/80121
* gfortran.dg/intent_out_9.f90: New test case.
From-SVN: r247083
2017-04-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/80392
* trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
building a derived type that includes a procedure pointer component
with a polymorphic result.
2017-04-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/80392
* gfortran.dg/proc_ptr_comp_49.f90: New test case.
From-SVN: r247069
PR libstdc++/80316
* include/std/future (_State_baseV2::_Setter::operator()): Remove
_S_check calls that are done after the pointer to the shared state is
already dereferenced.
(_State_baseV2::_Setter<_Res, void>): Define specialization for void
as partial specialization so it can be defined within the definition
of _State_baseV2.
(_State_baseV2::__setter): Call _S_check.
(_State_baseV2::__setter(promise<void>*)): Add overload for use by
promise<void>::set_value and promise<void>::set_value_at_thread_exit.
(promise<T>, promise<T&>, promise<void>): Make _State a friend.
(_State_baseV2::_Setter<void, void>): Remove explicit specialization.
(promise<void>::set_value, promise<void>::set_value_at_thread_exit):
Use new __setter overload.
* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
* testsuite/30_threads/promise/members/set_exception.cc: Test
promise<T&> and promise<void> specializations.
* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
Test for no_state error condition.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
From-SVN: r247064
The fix for PR demangler/70909 and 67264 (endless demangler recursion)
catches when a demangle_component is printed in a cycle. But that doesn't
protect the call stack blowing up from non-cyclic nested types printed
recursively through d_print_comp. This can happen by a (very) long mangled
string that simply creates a very deep pointer or qualifier chain. Limit
the recursive d_print_comp call depth for a d_print_info to 1K nested
types.
libiberty/ChangeLog:
* cp-demangle.c (MAX_RECURSION_COUNT): New constant.
(struct d_print_info): Add recursion field.
(d_print_init): Initialize recursion.
(d_print_comp): Check and update d_print_info recursion depth.
From-SVN: r247056
d_add_substitution can fail for various reasons, like when the subs array
is full. If d_add_substitution fails d_substitution should return NULL
early and not try to continue. Every other call of d_add_substitution
is handled in the same way.
libiberty/ChangeLog:
* cp-demangle.c (d_substitution): Return NULL if d_add_substitution
fails.
From-SVN: r247055
The d_info field did_subs was used for estimating the string output
size. It was no longer used when the malloc-less callback interface
was introduced in 2007 (svn r121305). But the field was still updated.
When backtracking was introduced in 2013 (svn r205292) did_subs was
also added to the d_info_checkpoint struct. But except for updating
the field it was still not used.
Since it is never used just stop updating the field and remove it
from the two structs.
libiberty/ChangeLog:
* cp-demangle.h (struct d_info): Remove did_subs field.
* cp-demangle.c (struct d_info_checkpoint): Likewise.
(d_template_param): Don't update did_subs.
(d_substitution): Likewise.
(d_checkpoint): Don't assign did_subs.
(d_backtrack): Likewise.
(cplus_demangle_init_info): Don't initialize did_subs.
From-SVN: r247054
PR c/80468
* c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
enabled, set specs->type to integer_type_node.
* gcc.dg/pr80468.c: New test.
From-SVN: r247052
2017-04-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/80237
* tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
defaulted to NULL.
(phi_translate_1): Also allow a leader in AVAIL_OUT of pred
for a simplified result.
* gcc.dg/tree-ssa/tailcall-9.c: New testcase.
* gcc.dg/tree-ssa/ldist-pr45948.c: Remove undefined behavior,
adjust expected optimizations.
From-SVN: r247049
2016-04-21 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
sth as strict as a simple_iv but a chrec without symbols and an
operand defined in the loop we are peeling (and not some subloop).
(propagate_constants_for_unrolling): Propagate all constants.
* gcc.dg/vect/no-scevccp-outer-13.c: Adjust to prevent unrolling
of inner loops.
* gcc.dg/vect/no-scevccp-outer-7.c: Likewise.
* gcc.dg/vect/vect-104.c: Likewise.
From-SVN: r247048
gcc/cp:
PR c++/80473
* init.c (build_new_1): Suppress notes about over-aligned new when
the warning is suppressed.
gcc/testsuite:
PR c++/80473
* g++.dg/diagnostic/pr80473.C: New test.
From-SVN: r247033
gcc/
* omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
lastprivate clauses in SIMT case.
libgomp/
* testsuite/libgomp.c/target-36.c: New testcase.
From-SVN: r247029
* c.opt (Wextra-semi): New C++ warning flag.
* doc/invoke.texi (-Wextra-semi): Document new warning option.
* parser.c (cp_parser_member_declaration): Add warning with fixit
information for extra semicolon after in-class function definition.
* g++.dg/warn/Wextra-semi.C: New test.
From-SVN: r247028
2017-04-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/57796
* tree-vect-stmts.c (vect_model_store_cost): Cost scatters
as N scalar stores.
(vect_model_load_cost): Cost gathers as N scalar loads.
From-SVN: r247026
2017-04-20 Richard Biener <rguenther@suse.de>
* ggc-page.c (ggc_allocated_p): Rename to ...
(safe_lookup_page_table_entry): ... this and return the lookup
result.
(gt_ggc_m_S): Use safe_lookup_page_table_entry.
From-SVN: r247025
2017-04-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/80453
* tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
* tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
from the conditions.
(vn_phi_eq): Pass them down.
(vn_phi_lookup): Record them.
(vn_phi_insert): Likewise.
From-SVN: r247024
PR middle-end/80423
* tree.h (build_array_type): Add typeless_storage default argument.
* tree.c (type_cache_hasher::equal): Also compare
TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
(build_array_type): Add typeless_storage argument, set
TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
recursive call.
(build_nonshared_array_type): Adjust build_array_type_1 caller.
(build_array_type): Likewise. Add typeless_storage argument.
c-family/
* c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
cp/
* tree.c (build_cplus_array_type): Call build_array_type
with the intended TYPE_TYPELESS_STORAGE flag value, instead
of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
on the shared type.
testsuite/
* g++.dg/other/pr80423.C: New test.
From-SVN: r247014
The testcase uses 32 bit or bigger pointer offsets, and
that triggers an ptrofftype_p assert in tree.c.
gcc/testsuite
2017-04-19 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/pr80170.c: Require ptr32plus.
From-SVN: r247011