gcc.git
7 years agoSplit <functional> into smaller pieces
Jonathan Wakely [Fri, 21 Oct 2016 15:32:25 +0000 (16:32 +0100)]
Split <functional> into smaller pieces

* include/Makefile.am: Add <bits/refwrap.h> and <bits/std_function.h>.
Order alphabetically.
* include/Makefile.in: Regenerate.
* include/bits/refwrap.h: New header.
(_Maybe_get_result_type,_Weak_result_type_impl, _Weak_result_type)
(_Reference_wrapper_base_impl, _Reference_wrapper_base)
(reference_wrapper, ref, cref): Move here from <functional>.
* include/bits/shared_ptr_base.h: Include <bits/refwrap.h> and
<bits/stl_function.h> instead of <functional>.
* include/bits/std_function.h: New header.
(_Maybe_unary_or_binary_function, bad_function_call)
(__is_location_invariant, _Nocopy_types, _Any_data)
(_Simple_type_wrapper, _Function_base, _Function_handler, function):
Move here from <functional>.
* include/bits/unique_ptr.h: Include <bits/stl_function.h>.
* include/std/functional: Include new headers and move components to
them.
* include/std/future: Include <bits/std_function.h> instead of
<functional>.
* include/std/mutex: Likewise.
* include/std/regex: Likewise.
* src/c++11/compatibility-thread-c++0x.cc: Include <functional>.
* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
* testsuite/20_util/default_delete/void_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
lines.
* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
* testsuite/30_threads/packaged_task/49668.cc: Include <functional>.

From-SVN: r241410

7 years agodwarf2out.c (ranges_table): Change into vec<dw_ranges, va_gc> *.
Jakub Jelinek [Fri, 21 Oct 2016 15:19:52 +0000 (17:19 +0200)]
dwarf2out.c (ranges_table): Change into vec<dw_ranges, va_gc> *.

* dwarf2out.c (ranges_table): Change into vec<dw_ranges, va_gc> *.
(ranges_by_label): Change into vec<dw_ranges_by_label, va_gc> *.
(ranges_table_allocated, ranges_table_in_use,
ranges_by_label_allocated, ranges_by_label_in_use,
RANGES_TABLE_INCREMENT): Removed.
(add_ranges_num): Use vec_safe_push into ranges_table.
(add_ranges_by_labels): Use vec_safe_push into ranges_by_label.
(output_ranges): Adjust for ranges_table and ranges_by_label
conversion from arrays to vec.
(add_high_low_attributes, dwarf2out_finish): Adjust for range_table
conversion from arrays to vec.
(dwarf2out_c_finalize): Don't clear ranges_table_allocated,
ranges_table_in_use, ranges_by_label_allocated and
ranges_by_label_in_use.  Set ranges_by_label to NULL instead of 0.

From-SVN: r241409

7 years agodwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute if needed.
Jakub Jelinek [Fri, 21 Oct 2016 15:11:48 +0000 (17:11 +0200)]
dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute if needed.

* dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute
if needed.  Re-add origin_die variable and its initialization.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle
DW_AT_const_expr.
testsuite/
* g++.dg/debug/dwarf2/constexpr-var-1.C: New test.

From-SVN: r241408

7 years agogimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse...
Jakub Jelinek [Fri, 21 Oct 2016 15:09:49 +0000 (17:09 +0200)]
gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse=none, or for volatile vars etc.

* gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns
even for -fstack-reuse=none, or for volatile vars etc.

From-SVN: r241407

7 years agoStart adding selftests for print_rtx
David Malcolm [Fri, 21 Oct 2016 13:52:53 +0000 (13:52 +0000)]
Start adding selftests for print_rtx

gcc/ChangeLog:
* print-rtl-function.c (flag_compact): Move extern decl to...
* print-rtl.h (flag_compact): ...here.
* rtl-tests.c (selftests::assert_rtl_dump_eq): New function.
(ASSERT_RTL_DUMP_EQ): New macro.
(selftest::test_dumping_regs): New function.
(selftest::test_dumping_insns): New function.
(selftest::test_uncond_jump): Add uses of ASSERT_RTL_DUMP_EQ on
the insns.
(selftest::rtl_tests_c_tests): Call the new test functions.

From-SVN: r241405

7 years agoUse global operator new in std::make_exception_ptr
Jonathan Wakely [Fri, 21 Oct 2016 13:21:09 +0000 (14:21 +0100)]
Use global operator new in std::make_exception_ptr

* libsupc++/exception_ptr.h (make_exception_ptr): Qualify new.
* testsuite/18_support/exception_ptr/make_exception_ptr_2.cc: New
test.

From-SVN: r241404

7 years agore PR fortran/69566 ([OOP] Failure of SELECT TYPE with unlimited polymorphic function...
Paul Thomas [Fri, 21 Oct 2016 12:50:56 +0000 (12:50 +0000)]
re PR fortran/69566 ([OOP] Failure of SELECT TYPE with unlimited polymorphic function result)

2016-10-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69566
* resolve.c (fixup_array_ref): New function.
(resolve_select_type): Gather up the rank and array reference,
if any, from the selector. Fix up the 'associate name' and the
'associate entities' as necessary.
* trans-expr.c (gfc_conv_class_to_class): If the symbol backend
decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.

2016-10-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69566
* gfortran.dg/select_type_37.f03: New test.

From-SVN: r241403

7 years agomake tablejump_p return the label as a rtx_insn *
Trevor Saunders [Fri, 21 Oct 2016 12:33:01 +0000 (12:33 +0000)]
make tablejump_p return the label as a rtx_insn *

gcc/ChangeLog:

2016-10-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust.
(outgoing_edges_match): Likewise.
(try_crossjump_to_edge): Likewise.
* cfgrtl.c (try_redirect_by_replacing_jump): Likewise.
(rtl_tidy_fallthru_edge): Likewise.
* rtl.h (tablejump_p): Adjust prototype.
* rtlanal.c (tablejump_p): Return the label as a rtx_insn *.

From-SVN: r241402

7 years agomake LABEL_REF_LABEL a rtx_insn *
Trevor Saunders [Fri, 21 Oct 2016 12:32:56 +0000 (12:32 +0000)]
make LABEL_REF_LABEL a rtx_insn *

While changing LABEL_REF_LABEL it might as well become an inline
function, so that its clearer what types are involved.  Unfortunately
because it is still possible to use XEXP and related macros on a
LABEL_REF rtx you can still set the field to be a non insn rtx.  The
other unfortunate thing is that the generators actually create LABEL_REF
rtx that refer to MATCH_x rtx, so there we actually need to use XEXP to
bypass the checking this patch adds.

gcc/ChangeLog:

2016-10-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* rtl.h (label_ref_label): New function.
(set_label_ref_label): New function.
(LABEL_REF_LABEL): Delete.
* alias.c (rtx_equal_for_memref_p): Adjust.
* cfgbuild.c (make_edges): Likewise.
(purge_dead_tablejump_edges): Likewise.
* cfgexpand.c (convert_debug_memory_address): Likewise.
* cfgrtl.c (patch_jump_insn): Likewise.
* combine.c (distribute_notes): Likewise.
* cse.c (hash_rtx_cb): Likewise.
(exp_equiv_p): Likewise.
(fold_rtx): Likewise.
(check_for_label_ref): Likewise.
* cselib.c (rtx_equal_for_cselib_1): Likewise.
(cselib_hash_rtx): Likewise.
* emit-rtl.c (mark_label_nuses): Likewise.
* explow.c (convert_memory_address_addr_space_1): Likewise.
* final.c (output_asm_label): Likewise.
(output_addr_const): Likewise.
* gcse.c (add_label_notes): Likewise.
* genconfig.c (walk_insn_part): Likewise.
* genrecog.c (validate_pattern): Likewise.
* ifcvt.c (cond_exec_get_condition): Likewise.
(noce_emit_store_flag): Likewise.
(noce_get_alt_condition): Likewise.
(noce_get_condition): Likewise.
* jump.c (maybe_propagate_label_ref): Likewise.
(mark_jump_label_1): Likewise.
(redirect_exp_1): Likewise.
(rtx_renumbered_equal_p): Likewise.
* lra-constraints.c (operands_match_p): Likewise.
* print-rtl.c (print_value): Likewise.
* reload.c (find_reloads): Likewise.
* reload1.c (set_label_offsets): Likewise.
* reorg.c (get_branch_condition): Likewise.
* rtl-tests.c (test_uncond_jump): Likewise.
* rtl.c (rtx_equal_p_cb): Likewise.
(rtx_equal_p): Likewise.
* rtlanal.c (reg_mentioned_p): Likewise.
(rtx_referenced_p): Likewise.
(get_condition): Likewise.
* varasm.c (const_hash_1): Likewise.
(compare_constant): Likewise.
(const_rtx_hash_1): Likewise.
(output_constant_pool_1): Likewise.

From-SVN: r241401

7 years agoFix PR 71627 - unable to find a register to spill
Senthil Kumar Selvaraj [Fri, 21 Oct 2016 11:48:19 +0000 (11:48 +0000)]
Fix PR 71627 - unable to find a register to spill

Tweak find_valid_class_1 to consider a reg class if atleast one regno in
that class is ok.

Previously, even if no regno was in_hard_reg_set_p, the code goes ahead and
considers rclass as valid. bad was set only if a regno was in the reg
class *and* HARD_REGNO_MODE_OK was false - if both were false, bad wasn't
set and the reload got a wrong rclass. If that happened to be the best
one, this eventually lead to find_reg running out of registers to
spill, because the chosen rclass wouldn't have enough regs.

Also, it expected every regno in rclass to be valid for mode
i.e., if any regno fails HARD_REGNO_MODE_OK, it rejected the rclass. The
comments in the original commit for find_valid_class_1 say atleast one
regno is ok. This was updated to say "class which contains only
registers" when in_hard_reg_set_p was introduced in place of just
TEST_HARD_REG_BIT.

This commit fixes both of the above problems by not breaking out of the loop
on first unavailable regno. Instead, it computes the rclass size consisting
of all regnos in that class valid for the current mode.

If that computed size is zero, the rclass would be skipped, as it won't
beat best_size. Otherwise, the computed size is used to choose the best
rclass, instead of the static size from reg_class_size.

gcc/

2016-10-21  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

PR target/71627
* reload.c (find_valid_class_1): Allow regclass if atleast one
regno in regclass is ok. Compute and use rclass size based on
actually available regnos for mode in rclass.

gcc/testsuite/

2016-10-21  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

PR target/71627
* gcc.target/avr/pr71627.c: New test

From-SVN: r241400

7 years agoMAINTAINERS: Update email address
Hartmut Penner [Fri, 21 Oct 2016 11:29:52 +0000 (11:29 +0000)]
MAINTAINERS: Update email address

* MAINTAINERS: Update email address

Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
From-SVN: r241399

7 years agotree-ssa-loop-split.c: Remove trailing spaces.
Eric Botcazou [Fri, 21 Oct 2016 09:17:47 +0000 (09:17 +0000)]
tree-ssa-loop-split.c: Remove trailing spaces.

* tree-ssa-loop-split.c: Remove trailing spaces.
* match.pd: Likewise.

From-SVN: r241398

7 years agosparc-modes.def (CCV): New.
Eric Botcazou [Fri, 21 Oct 2016 09:16:29 +0000 (09:16 +0000)]
sparc-modes.def (CCV): New.

* config/sparc/sparc-modes.def (CCV): New.
(CCXV): Likewise.
* config/sparc/predicates.md (v_comparison_operator): New.
(icc_comparison_operator): Add support for CCV/CCXV.
(xcc_comparison_operator): Likewise.
* config/sparc/sparc.c (output_cbranch): Likewise.
(sparc_print_operand): Likewise.
* config/sparc/sparc.md (UNSPEC_{ADD,SUB,NEG}V): New constants.
(uaddvdi4): New expander.
(addvdi4): Likewise.
(uaddvdi4_sp32): New instruction.
(addvdi4_sp32): Likewise.
(uaddvsi4): New expander.
(addvsi4): Likewise.
(cmp_ccc_plus_sltu_set): New instruction.
(cmp_ccv_plus): Likewise.
(cmp_ccxv_plus): Likewise.
(cmp_ccv_plus_set): Likewise.
(cmp_ccxv_plus_set): Likewise.
(cmp_ccv_plus_sltu_set): Likewise.
(uaddvdi4): New expander.
(subvdi4): Likewise.
(usubdi4_sp32): New instruction.
(subvdi4_sp32): Likewise.
(usubvsi4): New expander.
(subvsi4): Likewise.
(cmpsi_minus_sltu_set): New instruction.
(cmp_ccv_minus): Likewise.
(cmp_ccxv_minus): Likewise.
(cmp_ccv_minus_set): Likewise.
(cmp_ccxv_minus_set): Likewise.
(cmp_ccv_minus_sltu_set): Likewise.
(unegvdi3): New expander.
(negvdi3): Likewise.
(unegdi3_sp32): New instruction.
(negvdi3_sp32): Likewise.
(unegvsi3): New expander.
(negvsi3): Likewise.
(cmp_ccc_neg_sltu_set): New instruction.
(cmp_ccv_neg): Likewise.
(cmp_ccxv_neg): Likewise.
(cmp_ccv_neg_set): Likewise.
(cmp_ccxv_neg_set): Likewise.
(cmp_ccv_neg_sltu_set): Likewise.

From-SVN: r241397

7 years agopure-code.exp: Require arm_cortex_m effective target.
Andre Vieira [Fri, 21 Oct 2016 08:53:27 +0000 (08:53 +0000)]
pure-code.exp: Require arm_cortex_m effective target.

2016-10-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/arm/pure-code/pure-code.exp: Require arm_cortex_m
effective target.

From-SVN: r241396

7 years ago[ree] PR rtl-optimization/78038: Handle global register dataflow definitions in ree
Kyrylo Tkachov [Fri, 21 Oct 2016 07:55:30 +0000 (07:55 +0000)]
[ree] PR rtl-optimization/78038: Handle global register dataflow definitions in ree

PR rtl-optimization/78038
* ree.c (get_defs): Return NULL if a defining insn for REG cannot
be deduced to set REG through the RTL structure.
(make_defs_and_copies_lists): Return false on a failing get_defs call.

* gcc.target/aarch64/pr78038.c: New test.

From-SVN: r241395

7 years agore PR c++/78051 (error: dead STMT in EH table when using -O2)
Richard Biener [Fri, 21 Oct 2016 07:07:06 +0000 (07:07 +0000)]
re PR c++/78051 (error: dead STMT in EH table when using -O2)

2016-10-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78051
* tree-vrp.c (evrp_dom_walker::before_dom_children): Update stmt
and mark replaced if folding did something.

* g++.dg/torture/pr78051.C: New testcase.

From-SVN: r241394

7 years agors6000.c (rs6000_assemble_visibility): Swap "internal" and "protected" in visibility...
David Edelsohn [Fri, 21 Oct 2016 02:26:09 +0000 (02:26 +0000)]
rs6000.c (rs6000_assemble_visibility): Swap "internal" and "protected" in visibility types.

* config/rs6000/rs6000.c (rs6000_assemble_visibility): Swap "internal"
and "protected" in visibility types.
(rs6000_xcoff_declare_function_name): Fix formatting.
(rs6000_xcoff_declare_object_name): Fix formatting.

From-SVN: r241393

7 years agotransfer.c (finalize_transfer): Free format data in child procedures.
Jerry DeLisle [Fri, 21 Oct 2016 01:41:03 +0000 (01:41 +0000)]
transfer.c (finalize_transfer): Free format data in child procedures.

2016-10-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

* io/transfer.c (finalize_transfer): Free format data in child
procedures. (st_read_done, st_write_done): Don't free format
hash table.

From-SVN: r241392

7 years agoDaily bump.
GCC Administrator [Fri, 21 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241391

7 years agoarray.c (gfc_match_array_constructor): Remove set, but unused variable.
Steven G. Kargl [Thu, 20 Oct 2016 23:55:19 +0000 (23:55 +0000)]
array.c (gfc_match_array_constructor): Remove set, but unused variable.

2016-10-20  Steven G. Kargl  <kargl@gcc.gnu.org>

* array.c (gfc_match_array_constructor): Remove set, but unused
variable.

From-SVN: r241388

7 years agoi386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ and IX86_BUILTIN_HUGE_VALQ here ...
Uros Bizjak [Thu, 20 Oct 2016 22:57:11 +0000 (00:57 +0200)]
i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ and IX86_BUILTIN_HUGE_VALQ here ...

* config/i386/i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ
and IX86_BUILTIN_HUGE_VALQ here ...
(ix86_expand_builtin): ... not here.

From-SVN: r241387

7 years agowdate-time.c: Restored test case.
Bernd Edlinger [Thu, 20 Oct 2016 19:39:19 +0000 (19:39 +0000)]
wdate-time.c: Restored test case.

2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-c++-common/wdate-time.c: Restored test case.
        * g++.dg/warn/Wconversion-real.C: Deleted empty file.

From-SVN: r241385

7 years agoruntime: rewrite interface code into Go
Ian Lance Taylor [Thu, 20 Oct 2016 18:51:35 +0000 (18:51 +0000)]
runtime: rewrite interface code into Go

    I started to copy the Go 1.7 interface code, but the gc and gccgo
    representations of interfaces are too different.  So instead I rewrote
    the gccgo interface code from C to Go.  The code is largely the same as
    it was, but the names are more like those used in the gc runtime.

    I also copied over the string comparison functions, and tweaked the
    compiler to use eqstring when comparing strings for equality.

    Reviewed-on: https://go-review.googlesource.com/31591

From-SVN: r241384

7 years ago* g++.dg/cpp1z/inline-var1.C (w): Initialize to 64 + 2.
Jakub Jelinek [Thu, 20 Oct 2016 18:37:40 +0000 (20:37 +0200)]
* g++.dg/cpp1z/inline-var1.C (w): Initialize to 64 + 2.

From-SVN: r241383

7 years ago* doc/gty.texi (for_user): Use @item next to @findex.
Jakub Jelinek [Thu, 20 Oct 2016 18:34:31 +0000 (20:34 +0200)]
* doc/gty.texi (for_user): Use @item next to @findex.

From-SVN: r241382

7 years agore PR target/78037 (Incorrect code generated at optimization level -O2 for tzcnt...
Uros Bizjak [Thu, 20 Oct 2016 17:53:10 +0000 (19:53 +0200)]
re PR target/78037 (Incorrect code generated at optimization level -O2 for tzcnt and binary and)

PR target/78037
* config/i386/bmiintrin.h (__tzcnt_u16): Call __builtin_ia32_tzcnt_u16.
(__tzcnt_u32, _tzcnt_u32): Call __builtin_ia32_tzcnt_u32.
(__tzcnt_u64, _tzcnt_u64): Call __builtin_ia32_tzcnt_u64.
* config/i386/lzcntintrin.h (__lzcnt_u16): Call
__builtin_ia32_lzcnt_u16.
(__lzcnt_u32, _lzcnt_u32): Call __builtin_ia32_lzcnt_u32.
(__lzcnt_u64, _lzcnt_u64): Call __builtin_ia32_lzcnt_u64.
* config/i386/i386.md (UNSPEC_LZCNT, UNSPEC_TZCNT): New unspecs.
(ctz<mode>2, *ctz<mode>2): Use SWI48 mode iterator.
(bmi_tzcnt_<mode>): New expander.
(*bmi_tzcnt_<mode>_falsedep_1): New define_insn_and_split pattern.
(*bmi_tzcnt_<mode>_falsedep, *bmi_tzcnt_<mode>): New insn patterns.
(clz<mode>2_lzcnt, *clz<mode>2_lzcnt): Use SWI48 mode iterator.
(lzcnt_<mode>): New expander.
(*lzcnt_<mode>_falsedep_1): New define_insn_and_split pattern.
(*lzcnt_<mode>_falsedep, *lzcnt_<mode>): New insn patterns.
* config/i386/i386-builtin-types.def (UINT_FTYPE_UINT): New.
(UINT64_FTYPE_UINT64): New.
* config/i386/i386-builtin.def (__builtin_clzs): Remove description.
(__builtin_ia32_lzcnt_u16): New description.
(__builtin_ia32_lzcnt_u32): Ditto.
(__builtin_ia32_lzcnt_u64): Ditto.
(__builtin_ctzs): Remove description.
(__builtin_ia32_tzcnt_u16): New description.
(__builtin_ia32_tzcnt_u32): Ditto.
(__builtin_ia32_tzcnt_u64): Ditto.
* config/i386/i386.c (ix86_expand_args_builtin): Handle
UINT_FTYPE_UINT and UINT64_FTYPE_UINT64.

testsuite/ChangeLog:

PR target/78037
* gcc.target/i386/pr78037.c: New test.

From-SVN: r241381

7 years agoDo not fixup edges for a thunk in LTRANS (PR lto/78049)
Martin Liska [Thu, 20 Oct 2016 15:30:17 +0000 (17:30 +0200)]
Do not fixup edges for a thunk in LTRANS (PR lto/78049)

PR lto/78049
* lto-streamer-in.c (fixup_call_stmt_edges_1): Replace value
comparison with STMT_UID_NOT_IN_RANGE.
(fixup_call_stmt_edges): Do not fixup edges of a thunk in
LTRANS.

From-SVN: r241380

7 years agocompare-elim.c (conforming_compare): Accept UNSPECs.
Eric Botcazou [Thu, 20 Oct 2016 14:38:43 +0000 (14:38 +0000)]
compare-elim.c (conforming_compare): Accept UNSPECs.

* compare-elim.c (conforming_compare): Accept UNSPECs.
(find_comparison_dom_walker::before_dom_children): Deal with
instructions both using and killing the flags register.
(equivalent_reg_at_start): New function extracted from...
(try_eliminate_compare): ...here.  Use it and add support for
registers and UNSPECs as second operand of the compare.
* config/visium/visium-modes.def (CCV): New.
* config/visium/predicates.md (visium_v_comparison_operator): New.
(visium_branch_operator): Deal with CCV mode.
* config/visium/visium.c (visium_select_cc_mode): Likewise.
(output_cbranch): Likewise.
* config/visium/visium.md (UNSPEC_{ADD,SUB,NEG}V): New constants.
(uaddv<mode>4): New expander.
(addv<mode>4): Likewise.
(add<mode>3_insn_set_carry): New instruction.
(add<mode>3_insn_set_overflow): Likewise.
(addsi3_insn_set_overflow): Likewise.
(usubv<mode>4): New expander.
(subv<mode>4): Likewise.
(sub<mode>3_insn_set_carry): New instruction.
(sub<mode>3_insn_set_overflow): Likewise.
(subsi3_insn_set_overflow): Likewise.
(unegv<mode>3): New expander.
(negv<mode>3): Likewise.
(neg<mode>2_insn_set_overflow): New instruction.
(addv_tst<mode>): Likewise.
(subv_tst<mode>): Likewise.
(negv_tst<mode>): Likewise.
(cbranch<mode>4_addv_insn): New splitter and instruction.
(cbranch<mode>4_subv_insn): Likewise.
(cbranch<mode>4_negv_insn): Likewise.

From-SVN: r241379

7 years agotree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.
Richard Biener [Thu, 20 Oct 2016 14:14:47 +0000 (14:14 +0000)]
tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.

2016-10-20  Richard Biener  <rguenther@suse.de>

* tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.
Handle decls possibly not bound.
* tree-ssa-structalias.c (get_constraint_for_ssa_var): Add
nothing_id for decls that might not be bound if we are interested
for the address.
(get_constraint_for_component_ref): Deal with that.

From-SVN: r241378

7 years agoc-common.c (c_common_truthvalue_conversion): Fix the comment.
Bernd Edlinger [Thu, 20 Oct 2016 14:00:46 +0000 (14:00 +0000)]
c-common.c (c_common_truthvalue_conversion): Fix the comment.

2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-common.c (c_common_truthvalue_conversion): Fix the comment.

From-SVN: r241377

7 years ago* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
Jason Merrill [Thu, 20 Oct 2016 13:49:28 +0000 (09:49 -0400)]
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.

From-SVN: r241376

7 years ago* g++.dg/cpp1z/aligned-new7.C: Fix for small MAX_STACK_ALIGNMENT targets.
Jason Merrill [Thu, 20 Oct 2016 13:47:25 +0000 (09:47 -0400)]
* g++.dg/cpp1z/aligned-new7.C: Fix for small MAX_STACK_ALIGNMENT targets.

From-SVN: r241375

7 years agoloop splitting
Michael Matz [Thu, 20 Oct 2016 12:18:32 +0000 (12:18 +0000)]
loop splitting

(approved at https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00648.html )

* common.opt (-fsplit-loops): New flag.
* passes.def (pass_loop_split): Add.
* opts.c (default_options_table): Add OPT_fsplit_loops entry at -O3.
(enable_fdo_optimizations): Add loop splitting.
* timevar.def (TV_LOOP_SPLIT): Add.
* tree-pass.h (make_pass_loop_split): Declare.
* tree-ssa-loop-manip.h (rewrite_into_loop_closed_ssa_1): Declare.
* tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h,
* tree-ssa-loop-split.c: New file.
* Makefile.in (OBJS): Add tree-ssa-loop-split.o.
* doc/invoke.texi (fsplit-loops): Document.
* doc/passes.texi (Loop optimization): Add paragraph about loop
splitting.

testsuite/
* gcc.dg/loop-split.c: New test.
* gcc.dg/tree-ssa/ifc-9.c: Update.
* gcc.dg/tree-ssa/ifc-10.c: Update.

From-SVN: r241374

7 years agoPrepare shared_ptr for array support
Jonathan Wakely [Thu, 20 Oct 2016 12:07:45 +0000 (13:07 +0100)]
Prepare shared_ptr for array support

* include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&))
(shared_ptr(auto_ptr&&)): Adjust template parameter lists.
* include/bits/shared_ptr.h (__sp_compatible_with)
(__sp_is_constructible): New helper traits for shared_ptr.
(shared_ptr::_Convertible): Replace with _Constructible.
(shared_ptr::_Constructible, shared_ptr::_Assignable): Forward checks
to base class.
(shared_ptr::shared_ptr, shared_ptr::operator=): Constrain template
with _Constructible and _Assignable.
(shared_ptr::shared_ptr(shared_ptr<_Tp1>, _Tp*)): Use element_type
instead of _Tp.
(operator<): Likewise.
(operator>): Define in terms of operator<.
(static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
element_type instead of _Tp.
(reinterpret_pointer_cast): Define for C++17.
(weak_ptr::_Convertible): Replace with _Constructible.
(weak_ptr::_Constructible, weak_ptr::_Assignable): Forward checks
to base class.
(weak_ptr::weak_ptr, weak_ptr::operator=): Constrain templates
with _Constructible and _Assignable.
* include/bits/shared_ptr_base.h (__shared_ptr::_Convertible): Replace
with _Compatible.
(__shared_ptr::_SafeConv): New constraint for incoming raw pointers.
(__shared_ptr::_Compatible): New constraint for converting from
other types of shared_ptr and weak_ptr.
(__shared_ptr::_Assignable): Define in terms of _Compatible.
(__shared_ptr::_UniqCompatible, __shared_ptr::_UniqAssignable): New
constraints for converting from unique_ptr.
(__shared_ptr::__shared_ptr, __shared_ptr::operator=): Constrain
template with _SaveConf, _Compatible and _Assignable. Remove
__glibcxx_function_requires concept checks. Add static assertion for
deleter expression being well-formed.
(__shared_ptr::__shared_ptr(__shared_ptr<_Tp1>, _Tp*))
(__shared_ptr::operator*, __shared_ptr::operator->)
(__shared_ptr::get, __shared_ptr::_M_ptr): Use element_type instead
of _Tp.
(operator<): Likewise.
(operator>): Define in terms of operator<.
(static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
element_type instead of _Tp.
(reinterpret_pointer_cast): Define for C++17.
(weak_ptr::_Convertible): Replace with _Compatible.
(weak_ptr::_Compatible, weak_ptr::_Assignable): New constraints for
conversions from other types of weak_ptr and shared_ptr.
(__weak_ptr::__weak_ptr, __weak_ptr::operator=): Constrain templates
with _Constructible and _Assignable.
(__weak_ptr::_M_ptr): Use element_type instead of _Tp.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Adjust
dg-error pattern.
* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Test conversions.
* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/reinterpret.cc: New test.

From-SVN: r241373

7 years agoDo the operator= SFINAE in the return type for optional,
Ville Voutilainen [Thu, 20 Oct 2016 11:54:52 +0000 (14:54 +0300)]
Do the operator= SFINAE in the return type for optional,

not in the template parameters.
* include/std/optional (operator=(_Up&&)): Move SFINAE
from template parameters to the return type.
(operator=(const optional<_Up>&)): Likewise.
(operator=(optional<_Up>&&)): Likewise.

From-SVN: r241372

7 years agoTweak whitespace in std::allocator files
Jonathan Wakely [Thu, 20 Oct 2016 11:37:19 +0000 (12:37 +0100)]
Tweak whitespace in std::allocator files

* include/bits/allocator.h: Remove trailing whitespace, tab-indent.
* include/ext/new_allocator.h: Likewise.

From-SVN: r241371

7 years agoMakefile (x86-64/Linux): Restore missing pairs.
Nicolas Roche [Thu, 20 Oct 2016 11:06:21 +0000 (11:06 +0000)]
Makefile (x86-64/Linux): Restore missing pairs.

* gcc-interface/Makefile (x86-64/Linux): Restore missing pairs.
(x86/Darwin): Likewise.

From-SVN: r241369

7 years agoclass.c (gfc_build_class_symbol): Set the kind of _len to gfc_charlen_int_kind to...
Andre Vehreschild [Thu, 20 Oct 2016 10:50:27 +0000 (12:50 +0200)]
class.c (gfc_build_class_symbol): Set the kind of _len to gfc_charlen_int_kind to catch changes of the charlen kind.

gcc/fortran/ChangeLog:

2016-10-20  Andre Vehreschild  <vehre@gcc.gnu.org>

* class.c (gfc_build_class_symbol): Set the kind of _len to
gfc_charlen_int_kind to catch changes of the charlen kind.

From-SVN: r241367

7 years agopr35356-1.c: Update.
Richard Biener [Thu, 20 Oct 2016 10:43:39 +0000 (10:43 +0000)]
pr35356-1.c: Update.

2016-10-20  Richard Biener  <rguenther@suse.de>

* gcc.dg/graphite/pr35356-1.c: Update.

From-SVN: r241366

7 years agoPR78052 Define std::allocator<void>::{construct,destroy}
Jonathan Wakely [Thu, 20 Oct 2016 10:13:10 +0000 (11:13 +0100)]
PR78052 Define std::allocator<void>::{construct,destroy}

PR libstdc++/78052
* include/bits/allocator.h (allocator<void>::construct)
(allocator<void>::destroy): Define.
* testsuite/20_util/allocator/void.cc: New test.

From-SVN: r241365

7 years agoAdd more tests for enable_shared_from_this ambiguities
Jonathan Wakely [Thu, 20 Oct 2016 10:13:04 +0000 (11:13 +0100)]
Add more tests for enable_shared_from_this ambiguities

* testsuite/20_util/enable_shared_from_this/56383.cc: Add tests for
additional ambiguous cases.

From-SVN: r241364

7 years agocgraphunit.c (analyze_functions): Set node->definition to false to signal symbol...
Richard Biener [Thu, 20 Oct 2016 08:49:48 +0000 (08:49 +0000)]
cgraphunit.c (analyze_functions): Set node->definition to false to signal symbol removal to...

2016-10-20  Richard Biener  <rguenther@suse.de>

* cgraphunit.c (analyze_functions): Set node->definition to
false to signal symbol removal to debug_hooks->late_global_decl.
* ipa.c (symbol_table::remove_unreachable_nodes): When not in
WPA signal symbol removal to the debuginfo machinery.
* dwarf2out.c (dwarf2out_late_global_decl): Instead of
using early_finised to guard the we're called for symbol
removal case look at the symtabs definition flag.
(gen_variable_die): Remove redundant check.

From-SVN: r241363

7 years agoS/390: Add fallthrough comment in md file.
Andreas Krebbel [Thu, 20 Oct 2016 08:43:50 +0000 (08:43 +0000)]
S/390: Add fallthrough comment in md file.

gcc/ChangeLog:

2016-10-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.md ("prefetch"): Add fallthrough comment.

From-SVN: r241362

7 years agore PR c++/77446 (Suspicious "non-constant condition for static assertion" error)
Paolo Carlini [Thu, 20 Oct 2016 08:15:49 +0000 (08:15 +0000)]
re PR c++/77446 (Suspicious "non-constant condition for static assertion" error)

2016-10-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/77446
* g++.dg/cpp1y/pr77446.C: New.

From-SVN: r241361

7 years agore PR tree-optimization/53979 (((a ^ b) | a) not optimized to (a | b))
Prathamesh Kulkarni [Thu, 20 Oct 2016 07:55:28 +0000 (07:55 +0000)]
re PR tree-optimization/53979 (((a ^ b) | a) not optimized to (a | b))

2016-10-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR tree-optimization/53979
* match.pd ((a ^ b) | a -> a | b): New pattern.

testsuite/
* gcc.dg/pr53979-1.c: New test-case.
* gcc.dg/pr53979-2.c: Likewise.

From-SVN: r241360

7 years agoDaily bump.
GCC Administrator [Thu, 20 Oct 2016 00:16:24 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241359

7 years agopa64-hpux-lib.h: New file.
John David Anglin [Wed, 19 Oct 2016 22:52:21 +0000 (22:52 +0000)]
pa64-hpux-lib.h: New file.

libgcc/
* config/pa/pa64-hpux-lib.h: New file.
(EH_FRAME_SECTION_NAME): Rename to __LIBGCC_EH_FRAME_SECTION_NAME__.
(DTORS_SECTION_ASM_OP): Rename to __LIBGCC_DTORS_SECTION_ASM_OP__.
* config.host (tm_file): Add pa/pa64-hpux-lib.h to tm_file on
hppa*64*-*-hpux11*.
gcc/
* config/pa/pa64-hpux.h (PA_INIT_FRAME_DUMMY_ASM_OP): Move to
config/pa/pa64-hpux-lib.h.
(PA_CRTBEGIN_HACK): Likewise.
(DTOR_LIST_BEGIN): Likewise.

From-SVN: r241356

7 years agoc-common.c (c_common_truthvalue_conversion): Warn only for signed integer shift ops...
Bernd Edlinger [Wed, 19 Oct 2016 21:00:39 +0000 (21:00 +0000)]
c-common.c (c_common_truthvalue_conversion): Warn only for signed integer shift ops in boolean context.

2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-common.c (c_common_truthvalue_conversion): Warn only for signed
        integer shift ops in boolean context.

testsuite:
2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-c++-common/Wint-in-bool-context-2.c: New test.

From-SVN: r241354

7 years agoMake std::enable_shared_from_this cope with ambiguity
Jonathan Wakely [Wed, 19 Oct 2016 20:13:14 +0000 (21:13 +0100)]
Make std::enable_shared_from_this cope with ambiguity

* include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&)): Call
_M_enable_shared_from_this_with instead of
__enable_shared_from_this_helper.
* include/bits/shared_ptr.h (__enable_shared_from_this_helper):
Remove overload for std::enable_shared_from_this..
(__enable_shared_from_this_base): Define friend function to select a
std::enable_shared_from_this base class.
* include/bits/shared_ptr_base.h (__enable_shared_from_this_helper):
Remove all overloads.
(__shared_ptr): Change all relevant constructors to call
_M_enable_shared_from_this_with instead of
__enable_shared_from_this_helper.
(__shared_ptr::__efst_base_t, __shared_ptr::__has_efst_base): Helpers
to detect accessible and unambiguous enable_shared_from_this bases.
(__shared_ptr::_M_enable_shared_from_this_with): New function to
replace __enable_shared_from_this_helper overloads.
(__enable_shared_from_this_helper): Remove overload for
std::__enable_shared_from_this.
(__enable_shared_from_this_base): Define friend function to select a
std::__enable_shared_from_this base class.
* include/experimental/bits/shared_ptr.h (experimental::shared_ptr):
Change relevant constructors to call _M_enable_shared_from_this_with.
(experimental::shared_ptr::__efst_base_t)
(experimental::shared_ptr::__has_efst_base): Helpers to detect
accessible and unambiguous enable_shared_from_this bases.
(experimental::shared_ptr::_M_enable_shared_from_this_with): Define.
(experimental::__enable_shared_from_this_helper): Remove overload for
std::experimental::enable_shared_from_this.
(experimental::__expt_enable_shared_from_this_base): Define friend
function to select a std::experimental::enable_shared_from_this base.
* testsuite/experimental/memory/shared_ptr/cons/
enable_shared_from_this.cc: New test.
* testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
Adjust expected behaviour for shared_ptr<A[]>.

From-SVN: r241353

7 years agodtio_17.f90: Fix test.
Jerry DeLisle [Wed, 19 Oct 2016 19:23:06 +0000 (19:23 +0000)]
dtio_17.f90: Fix test.

2016-10-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

* gfortran.dg/dtio_17.f90: Fix test.

From-SVN: r241352

7 years agoWalloca-1.c: Adjust test for !lp64 targets.
Aldy Hernandez [Wed, 19 Oct 2016 18:41:36 +0000 (18:41 +0000)]
Walloca-1.c: Adjust test for !lp64 targets.

* gcc.dg/Walloca-1.c: Adjust test for !lp64 targets.
* gcc.dg/Walloca-2.c: Same.

From-SVN: r241351

7 years agoFix copy&paste error in __gnu_debug::vector
Jonathan Wakely [Wed, 19 Oct 2016 18:33:47 +0000 (19:33 +0100)]
Fix copy&paste error in __gnu_debug::vector

* include/debug/vector (__gnu_debug::vector::emplace_back): Fix return
type.

From-SVN: r241350

7 years agoFix incorrect comment about std::auto_ptr
Jonathan Wakely [Wed, 19 Oct 2016 18:18:43 +0000 (19:18 +0100)]
Fix incorrect comment about std::auto_ptr

* include/backward/auto_ptr.h (dauto_ptr): Correct comment about
conversions from auto_ptr<Derived> rvalues to auto_ptr<Base>.
* testsuite/20_util/auto_ptr/assign_neg.cc: Remove redundant dg-error
directives that only match notes, not errors.

From-SVN: r241349

7 years agoarm.c (arm_emit_coreregs_64bit_shift): Clear the result register only if "in" and...
Bernd Edlinger [Wed, 19 Oct 2016 17:02:30 +0000 (17:02 +0000)]
arm.c (arm_emit_coreregs_64bit_shift): Clear the result register only if "in" and "out" are different registers.

2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/arm/arm.c (arm_emit_coreregs_64bit_shift): Clear the result
        register only if "in" and "out" are different registers.

From-SVN: r241348

7 years agoruntime, syscall: force EPOLLET to be positive
Ian Lance Taylor [Wed, 19 Oct 2016 16:53:13 +0000 (16:53 +0000)]
runtime, syscall: force EPOLLET to be positive

    The C definition is 1U << 31.  Reportedly on some systems GCC's
    -fgo-dump-spec can print this as -2147483648.

    Reviewed-on: https://go-review.googlesource.com/31448

From-SVN: r241347

7 years agoWvla-1.c: Rename to...
Aldy Hernandez [Wed, 19 Oct 2016 13:52:43 +0000 (13:52 +0000)]
Wvla-1.c: Rename to...

* gcc.dg/Wvla-1.c: Rename to...
* gcc.dg/Wvla-larger-than-1.c: ...this.
* gcc.dg/Wvla-2.c: Rename to...
* gcc.dg/Wvla-larger-than-2.c: ...this.
* gcc.dg/Wvla-3.c: Rename to...
* gcc.dg/Walloca-11.c.: ...this.
* gcc.dg/wvla-[1-7].c: Rename to:
* gcc.dg/Wvla-[1-7].c: ...this.

From-SVN: r241344

7 years agoomp-low.c (pass_oacc_device_lower::gate): New method.
Eric Botcazou [Wed, 19 Oct 2016 13:38:24 +0000 (13:38 +0000)]
omp-low.c (pass_oacc_device_lower::gate): New method.

* omp-low.c (pass_oacc_device_lower::gate): New method.
(execute): Always call execute_oacc_device_lower.

From-SVN: r241343

7 years agore PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operand...
Bill Schmidt [Wed, 19 Oct 2016 13:35:14 +0000 (13:35 +0000)]
re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operands to plus/minus)

2016-10-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/77916
PR tree-optimization/77937
* gimple-ssa-strength-reduction.c (analyze_increments): Remove
stopgap fix.
(insert_initializers): Requirement of initializer for -1 should be
based on pointer-typedness of the candidate basis.

From-SVN: r241342

7 years agoTest experimental::shared_ptr construction from other smart pointers
Jonathan Wakely [Wed, 19 Oct 2016 11:57:22 +0000 (12:57 +0100)]
Test experimental::shared_ptr construction from other smart pointers

* testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
Add tests for valid and invalid conversions.
* testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc:
Likewise.

From-SVN: r241340

7 years agore PR tree-optimization/78005 (172.mgrid and 450.soplex miscompare)
Bin Cheng [Wed, 19 Oct 2016 11:02:23 +0000 (11:02 +0000)]
re PR tree-optimization/78005 (172.mgrid and 450.soplex miscompare)

PR tree-optimization/78005
* tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Compute
upper (included) bound for niters of prolog loop.
(vect_gen_scalar_loop_niters): Change parameter VF to VFM1.
Compute niters of scalar loop above which vectorized loop is
preferred, as well as the upper (included) bound for the niters.
(vect_do_peeling): Record niter bound for loops accordingly.

gcc/testsuite
PR tree-optimization/78005
* gcc.dg/vect/pr78005.c: New.
* gcc.target/i386/l_fma_float_1.c: Revise test.
* gcc.target/i386/l_fma_float_2.c: Ditto.
* gcc.target/i386/l_fma_float_3.c: Ditto.
* gcc.target/i386/l_fma_float_4.c: Ditto.
* gcc.target/i386/l_fma_float_5.c: Ditto.
* gcc.target/i386/l_fma_float_6.c: Ditto.
* gcc.target/i386/l_fma_double_1.c: Ditto.
* gcc.target/i386/l_fma_double_2.c: Ditto.
* gcc.target/i386/l_fma_double_3.c: Ditto.
* gcc.target/i386/l_fma_double_4.c: Ditto.
* gcc.target/i386/l_fma_double_5.c: Ditto.
* gcc.target/i386/l_fma_double_6.c: Ditto.

From-SVN: r241339

7 years ago[PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types
Thomas Schwinge [Wed, 19 Oct 2016 10:48:46 +0000 (12:48 +0200)]
[PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types

gcc/
PR lto/77458
* tree-core.h (enum tree_index): Put the complex types after their
component types.
* tree-streamer.c (verify_common_node_recorded): New function.
(preload_common_nodes) <TREE_CODE (node) == COMPLEX_TYPE>: Use it.

From-SVN: r241338

7 years agoReplace NULL with false as a return value
Martin Liska [Wed, 19 Oct 2016 10:30:36 +0000 (12:30 +0200)]
Replace NULL with false as a return value

* cgraph.h (cgraph_edge::binds_to_current_def_p):
Replace NULL with false as a return value.

From-SVN: r241336

7 years ago[PR tree-optimization/78024] Clear basic block flags before using BB_VISITED for...
Thomas Schwinge [Wed, 19 Oct 2016 10:19:24 +0000 (12:19 +0200)]
[PR tree-optimization/78024] Clear basic block flags before using BB_VISITED for OpenACC loops processing

gcc/
* omp-low.c (oacc_loop_discovery): Call clear_bb_flags before, and
don't clear BB_VISITED after processing.

gcc/testsuite/
* gcc.dg/goacc/loop-processing-1.c: New file.

From-SVN: r241334

7 years agoMove negative unique_ptr tests to new file
Jonathan Wakely [Wed, 19 Oct 2016 10:10:54 +0000 (11:10 +0100)]
Move negative unique_ptr tests to new file

* testsuite/20_util/unique_ptr/cons/cv_qual.cc: Move negative tests
to new file.
* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: New file.  Fix
test for incompatible deleters to not also use incompatible types.
Add tests for incompatible array types.

From-SVN: r241332

7 years agoFix std::experimental::shared_ptr SFINAE constraints
Jonathan Wakely [Wed, 19 Oct 2016 09:35:03 +0000 (10:35 +0100)]
Fix std::experimental::shared_ptr SFINAE constraints

* include/experimental/bits/shared_ptr.h
(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::_Compatible): Just use
is_convertible for non-array specialization.
(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::_UniqCompatible): New
constraint for conversions from unique_ptr.
(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::__shared_ptr): Constrain.
(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::reset): Likewise.
(__sp_compatible_v): New variable template for trait.
(__sp_is_constructible): New trait to check shared_ptr constraints.
(__sp_is_constructible_v): New variable template for trait.
(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::_SafeConv): New
constraint for construction/reset, using __sp_is_constructible_v.
(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::_UniqCompatible): New
constraint for conversions from unique_ptr.
(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::__shared_ptr): Constrain.
(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::reset): Likewise.
(shared_ptr::_SafeConv): Constraint for checking constructors.
(shared_ptr(Tp1*), shared_ptr(_Tp1, _Deleter))
(shared_ptr(_Tp1, _Deleter, _Alloc)): Constrain with _SafeConv.
(shared_ptr(const weak_ptr<_Tp1>&)): Constrain with _Compatible.
(shared_ptr(auto_ptr<_Tp1>&&)): Fix, remove TODO.
* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc:
Remove tests using invalid conversions.
* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor_neg.cc:
New test.
* testsuite/experimental/memory/shared_ptr/cons/torture.cc: New test.
* testsuite/experimental/memory/shared_ptr/modifiers/reset.cc: Remove
tests using invalid conversions.
* testsuite/experimental/memory/shared_ptr/modifiers/reset_neg.cc: New
test.
* testsuite/experimental/memory/shared_ptr/observers/use_count.cc:
Remove tests using invalid conversions.

From-SVN: r241331

7 years agoPR77990 refactor unique_ptr to encapsulate tuple
Jonathan Wakely [Wed, 19 Oct 2016 09:34:57 +0000 (10:34 +0100)]
PR77990 refactor unique_ptr to encapsulate tuple

PR libstdc++/77990
* include/bits/unique_ptr.h (__uniq_ptr_impl): New type to
encapsulate implementation details.
(unique_ptr::unique_ptr(_Up)): Don't copy deleter object.
(unique_ptr::get, unique_ptr::get_deleter, unique_ptr::release):
Call member functions of implementation object.
(unique_ptr<T[], D>): Likewise.
* python/libstdcxx/v6/printers.py (UniquePointerPrinter): Adjust for
new implementation.
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
lines.
* testsuite/20_util/unique_ptr/assign/cv_qual.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/cv_qual.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/77990.cc: New test.

From-SVN: r241330

7 years agodomwalk.c (dom_walker::walk): Use RPO order.
Richard Biener [Wed, 19 Oct 2016 08:39:55 +0000 (08:39 +0000)]
domwalk.c (dom_walker::walk): Use RPO order.

2016-10-19  Richard Biener  <rguenther@suse.de>

* domwalk.c (dom_walker::walk): Use RPO order.

From-SVN: r241329

7 years agosystem-linux-armel.ads: Rename into...
Eric Botcazou [Wed, 19 Oct 2016 08:05:36 +0000 (08:05 +0000)]
system-linux-armel.ads: Rename into...

* system-linux-armel.ads: Rename into...
* system-linux-arm.ads: ...this
* gcc-interface/Makefile.in (ARM/Android): Adjust to above renaming.
(ARM/Linux): Likewise.
(Aarch64/Linux): Likewise.

From-SVN: r241328

7 years agotree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize stmts_to_remove.
Richard Biener [Wed, 19 Oct 2016 07:42:19 +0000 (07:42 +0000)]
tree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize stmts_to_remove.

2016-10-19  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize
stmts_to_remove.
(evrp_dom_walker::~evrp_dom_walker): Free it.
(evrp_dom_walker::stmts_to_remove): Add.
(evrp_dom_walker::before_dom_children): Mark PHIs and stmts
whose output we fully propagate for removal.  Propagate
into BB destination PHI arguments.
(execute_early_vrp): Remove queued stmts.  Dump value ranges
before stmt removal.

* gcc.dg/tree-ssa/pr61839_2.c: Fix testcase.

From-SVN: r241327

7 years agoDaily bump.
GCC Administrator [Wed, 19 Oct 2016 00:16:16 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241326

7 years agoFix formatting.
David Edelsohn [Tue, 18 Oct 2016 23:37:07 +0000 (19:37 -0400)]
Fix formatting.

From-SVN: r241322

7 years agoMakefile.in (OBJS): Add gimple-ssa-warn-alloca.o.
Aldy Hernandez [Tue, 18 Oct 2016 21:40:58 +0000 (21:40 +0000)]
Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o.

* Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o.
* passes.def: Add two instances of pass_walloca.
* tree-pass.h (make_pass_walloca): New.
* gimple-ssa-warn-walloca.c: New file.
* doc/invoke.texi: Document -Walloca, -Walloca-larger-than=, and
-Wvla-larger-than= options.

From-SVN: r241318

7 years agoMakefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
Eric Botcazou [Tue, 18 Oct 2016 20:29:53 +0000 (20:29 +0000)]
Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.

* gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
(EXTRA_GNATRTL_TASKING_OBJS): Likewise.
(ARM/Android): Add atomic support.
(SPARC/Solaris): Simplify.
(x86/Solaris): Likewise.
(x86/Linux): Likewise.
(x86-64/kFreeBDS): Adjust and use system-freebsd-x86.ads
(x86/FreeBSD): Add s-mudido-affinity.adb.
(x86-64/FreeBSD): Likewise and use system-freebsd-x86.ads.
(s390/Linux): Simplify.
(PowerPC/AIX): Likewise.
(Cygwin/Mingw): Likewise.
(MIPSel/Linux): Likewise.
(ARM/Linux): Add atomic support.
(Aarch64/Linux): Use system-linux-armel.ads.
(SPARC/Linux): Simplify.
(IA-64/Linux): Minor tweak.
(IA-64/HP-UX): Likewise.
(Alpha/Linux): Likewise.
(x86-64/Linux): Use system-linux-x86.ads.
(x86/Darwin): Simplify.
(PowerPC/Darwin): Likewise.
(ARM/Darwin): Use system-darwin-arm.ads.
(ADA_EXCLUDE_SRCS): Minor reformatting.
* system-aix.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
(Support_Atomic_Primitives): Set to True.
* system-aix64.ads: Delete.
* system-darwin-arm.ads: New.
* system-darwin-ppc.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
(Support_Atomic_Primitives): Set to True.
* system-darwin-ppc64.ads: New.
* system-darwin-x86.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-darwin-x86_64.ads: Delete.
* system-freebsd-x86.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-freebsd-x86_64.ads: Delete.
* system-linux-alpha.ads (Support_Atomic_Primitives): Set to True.
* system-linux-armeb.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
(Support_Atomic_Primitives): Set to True.
* system-linux-armel.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
(Support_Atomic_Primitives): Set to True.
* system-linux-mips.ads: (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-linux-mipsel.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-linux-s390.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
(Stack_Check_Probes): Set to True.
* system-linux-s390x.ads: Delete.
* system-linux-sparc.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-linux-sparcv9.ads: Delete.
* system-linux-x86.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-linux-x86_64.ads: Delete.
* system-mingw-x86_64.ads: Delete.
* system-mingw.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-solaris-sparc.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
(Support_Atomic_Primitives): Set to True.
* system-solaris-sparcv9.ads: Delete.
* system-solaris-x86.ads (Word_Size): Change to Standard'Word_Size.
(Memory_Size): Change to 2 ** Word_Size.
* system-solaris-x86_64.ads: Delete.

From-SVN: r241316

7 years agoUse FOR_ALL_BB_FN in a few more places
Thomas Schwinge [Tue, 18 Oct 2016 19:36:45 +0000 (21:36 +0200)]
Use FOR_ALL_BB_FN in a few more places

gcc/
* cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN.
* config/nvptx/nvptx.c (nvptx_find_sese): Likewise.

From-SVN: r241315

7 years agovec-all-ne-0.c: New test.
Kelvin Nilsen [Tue, 18 Oct 2016 19:31:38 +0000 (19:31 +0000)]
vec-all-ne-0.c: New test.

gcc/testsuite/ChangeLog:

2016-10-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/vsu/vec-all-ne-0.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-1.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-10.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-11.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-12.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-13.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-14.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-2.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-3.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-4.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-5.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-6.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-7.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-8.c: New test.
* gcc.target/powerpc/vsu/vec-all-ne-9.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-1.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-2.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-3.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-4.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-5.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-6.c: New test.
* gcc.target/powerpc/vsu/vec-all-nez-7.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-0.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-1.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-10.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-11.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-12.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-13.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-14.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-2.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-3.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-4.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-5.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-6.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-7.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-8.c: New test.
* gcc.target/powerpc/vsu/vec-any-eq-9.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-1.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-2.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-3.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-4.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-5.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-6.c: New test.
* gcc.target/powerpc/vsu/vec-any-eqz-7.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-0.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-1.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-2.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-3.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-4.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-5.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-6.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-8.c: New test.
* gcc.target/powerpc/vsu/vec-cmpne-9.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-1.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-2.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-3.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-4.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-5.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-6.c: New test.
* gcc.target/powerpc/vsu/vec-cmpnez-7.c: New test.
* gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c: New test.
* gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c: New test.
* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: New test.
* gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c: New test.
* gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c: New test.
* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-0.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-1.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-10.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-11.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-12.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-13.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-2.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-3.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-4.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-5.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-6.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-7.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-8.c: New test.
* gcc.target/powerpc/vsu/vec-xl-len-9.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-0.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-1.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-2.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-3.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-4.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-5.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-6.c: New test.
* gcc.target/powerpc/vsu/vec-xlx-7.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-0.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-1.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-2.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-3.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-4.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-5.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-6.c: New test.
* gcc.target/powerpc/vsu/vec-xrx-7.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-0.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-1.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-10.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-11.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-12.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-13.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-2.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-3.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-4.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-5.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-6.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-7.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-8.c: New test.
* gcc.target/powerpc/vsu/vec-xst-len-9.c: New test.
* gcc.target/powerpc/vsu/vsu.exp: New file.

gcc/ChangeLog:

2016-10-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/altivec.h (vec_xl_len): New macro.
(vec_xst_len): New macro.
(vec_cmpnez): New macro.
(vec_cntlz_lsbb): New macro.
(vec_cnttz_lsbb): New macro.
(vec_xlx): New macro.
(vec_xrx): New macro.
(vec_all_nez): New C++ predicate template.
(vec_any_eqz): New C++ predicate template.
(vec_all_ne): Revised C++ predicate template under _ARCH_PWR9
conditional compilation.
(vec_any_eq): Revised C++ predicate template under _ARCH_PWR9
conditional compilation.
(vec_all_nez): New macro.
(vec_any_eqz): New macro.
(vec_all_ne): Revised macro under _ARCH_PWR9 conditional
compilation.
(vec_any_eq): Revised macro under _ARCH_PWR9 conditional
compilation.
* config/rs6000/vector.md (VI): Moved this mode iterator
definition from altivec.md to vector.md.
(UNSPEC_NEZ_P): New value.
(vector_ne_<mode>_p): New expansion for implementation of
vec_all_ne and vec_any_eq built-in functions.
(vector_nez_<mode>_p): New expansion for implementation of
vec_all_nez and vec_any_eqz built-in functions.
(vector_ne_v2di_p): New expansion for implementation of vec_all_ne
and vec_any_eq built-in function.
(cr6_test_for_zero): New commentary to explain this expansion.
(cr6_test_for_zero_reverse): New commentary to explain this expansion.
(cr6_test_for_lt): New commentary to explain this expansion.
(cr6_test_for_lt_reverse): New commentary to explain this
expansion.
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
overloaded function prototypes for vec_all_ne, vec_all_nez,
vec_any_eq, vec_any_eqz, vec_cmpnez, vec_cntlz_lsbb,
vec_cnttz_lsbb, vec_xl_len, vec_xst_len, vec_xlx, and vec_xrx
built-in functions.
(altivec_resolve_overloaded_builtin): Modify the handling of
ALTIVEC_BUILTIN_VEC_CMPNE to use the Power9 instructions when
the compiler is configured to support TARGET_P9_VECTOR.
* config/rs6000/rs6000-builtin.def (BU_ALTIVEC_P): Add commentary
to explain the special processing that is given to predicate
built-ins introduced using this macro.
(BU_ALTIVEC_OVERLOAD_P): Add commentary to alert maintainers to
the special processing given to predicate built-ins introduced
using this macro.
(BU_VSX_P): Likewise.
(BU_P8V_AV_P): Likewise.
(BU_P9V_AV_P): Likewise.
(BU_P9V_AV_X): New macro.
(BU_P9V_64BIT_AV_X): New macro.
(BU_P9V_VSX_3): New macro.
(BU_P9V_OVERLOAD_P): New macro.
(LXVL): New BU_P9V_64BIT_VSX_2.
(VEXTUBLX): New BU_P9V_AV_2.
(VEXTUBRX): Likewise.
(VEXTUHLX): Likewise.
(VEXTUHRX): Likewise.
(VEXTUWLX): Likewise.
(VEXTUWRX): Likewise.
(STXVL): New BU_P9V_64BIT_AV_X.
(VCLZLSBB): New BU_P9V_AV_1.
(VCTZLSBB): Likewise.
(CMPNEB): New BU_P9V_AV_2.
(CMPNEH): Likewise.
(CMPNEW): Likewise.
(CMPNEF): Likewise.
(CMPNED): Likewise.
(VCMPNEB_P): New BU_P9V_AV_P.
(VCMPNEH_P): Likewise.
(VCMPNEW_P): Likewise.
(VCMPNED_P): Likewise.
(VCMPNEFP_P): Likewise.
(VCMPNEDP_P): Likewise.
(CMPNEZB): New BU_P9V_AV_2.
(CMPNEZH): Likewise.
(CMPNEZW): Likewise.
(VCMPNEZB_P): New BU_P9V_AV_P.
(VCMPNEZH_P): Likewise.
(VCMPNEZW_P): Likewise.
(LXVL): New BU_P9V_OVERLOAD_2.
(STXVL): New BU_P9V_OVERLOAD_3.
(VEXTULX): New BU_P9V_OVERLOAD_2.
(VEXTURX): Likewise.
(CMPNEZ): Likewise.
(VCMPNEZ_P): New BU_P9V_OVERLOAD_P.
(VCMPNE_P): Likewise.
(VCLZLSBB): New BU_P9V_OVERLOAD_1.
(VCTZLSBB): Likewise.
* config/rs6000/rs6000.c (altivec_expand_predicate_builtin): Add
comment to explain mode used for scratch register.
(altivec_expand_stxvl_builtin): New function.
(altivec_expand_builtin): Add case for new constant P9V_BUILTIN_STXVL.
(altivec_init_builtins): Add initialized variable
void_ftype_v16qi_pvoid_long and use this type to define the
built-in function __builtin_altivec_stxvl.
* config/rs6000/vsx.md (UNSPEC_LXVL): New value.
(UNSPEC_STXVL): New value.
(UNSPEC_VCLZLSBB): New value.
(UNSPEC_VCTZLSBB): New value.
(UNSPEC_VEXTUBLX): New value.
(UNSPEC_VEXTUHLX): New value.
(UNSPEC_VEXTUWLX): New value.
(UNSPEC_VEXTUBRX): New value.
(UNSPEC_VEXTUHRX): New value.
(UNSPEC_VEXTUWRX): New value.
(UNSPEC_VCMPNEB): New value.
(UNSPEC_VCMPNEZB): New value.
(UNSPEC_VCMPNEH): New value.
(UNSPEC_VCMPNEZH): New value.
(UNSPEC_VCMPNEW): New value.
(UNSPEC_VCMPNEZW): New value.
(*vsx_ne_<mode>_p): New insn for vector test all not equal with
vector of integer modes.
(*vsx_ne_<mode>_p): New insn for vector test all not equal with
vector of float or double modes.
(*vector_nez_<mode>_p): New insn for vector test all not equal or
zero.
(lxvl): New expand for load VSX vector with length.
(*lxvl): New insn for load VSX vector with length.
(stxvl): New expand for store VSX vector with length.
(*stxvl): New insn for store VSX vector with length.
(vcmpneb): New insn for vector of byte compare not equal.
(vcmpnezb): New insn for vector of byte compare not equal or zero.
(vcmpneh): New insn for vector of half word compare not equal.
(vcmpnezh): New insn for vector of half word compare not equal or
zero.
(vcmpnew): New insn for vector of word compare not equal.
(vcmpne<VSs>): New insn for vector of float or double compare not
equal.
(vcmpnezw): New insn for vector of word compare not equal or zero.
(vclzlsbb): New insn for vector count leading zero
least-significant bits byte.
(vctzlsbb): New insn for vector count trailing zero least
signficant bits byte.
(vextublx): New insn for vector extract unsigned byte left
indexed.
(vextubrx): New insn for vector extract unsigned byte right
indexed.
(vextuhlx): New insn for vector extract unsigned half word left
indexed.
(vextuhrx): New insn for vector extract unsigned half word right
indexed.
(vextuwlx): New insn for vector extract unsigned word left
indexed.
(vextuwrx): New insn for vector extract unsigned word right
indexed.
* config/rs6000/rs6000.h (RS6000_BTC_CONST): Enhance comment to
clarify intent of this constant.
* config/rs6000/altivec.md (VI): Move this mode iterator to vsx.md.
* doc/extend.texi (PowerPC Altivec Built-in Functions): Add
documentation for vec_all_nez, vec_any_eqz, vec_cmpnez,
vec_cntlz_lsbb, vec_cnttz_lsbb, vec_xl_len, vec_xst_len, vec_xlx,
and vec_xrx functions.

From-SVN: r241314

7 years agoxtensa: don't use unwind-dw2-fde-dip with elf targets
Max Filippov [Tue, 18 Oct 2016 19:12:19 +0000 (19:12 +0000)]
xtensa: don't use unwind-dw2-fde-dip with elf targets

Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.

This fixes build for elf target with windowed xtensa core that currently
breaks with the following error message:

  unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory

2016-10-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
* config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
definition.
* config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
definition.
* config/xtensa/t-windowed (LIB2ADDEH): Use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
or xtensa/t-linux.

From-SVN: r241313

7 years agoxtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT
Ding-Kai Chen [Tue, 18 Oct 2016 19:06:33 +0000 (19:06 +0000)]
xtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT

Use new FPU instruction sequences documented in the ISA book to
implement __divsf3, __divdf3, __recipsf2, __recipdf2, __rsqrtsf2,
__rsqrtdf2 and __ieee754_sqrtf and __ieee754_sqrt.

2016-10-18  Ding-Kai Chen  <dkchen@cadence.com>
libgcc/
* config/xtensa/ieee754-df.S (__recipdf2, __rsqrtdf2,
__ieee754_sqrt): New functions.
(__divdf3): Add implementation with new FPU instructions under
#if XCHAL_HAVE_DFP_DIV.
* config/xtensa/ieee754-sf.S (__recipsf2, __rsqrtsf2,
__ieee754_sqrtf): New functions.
(__divsf3): Add implementation with new FPU instructions under
#if XCHAL_HAVE_FP_DIV.
* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _sqrtf, _recipsf2
_rsqrtsf2, _sqrt, _recipdf2 and _rsqrtdf2.

From-SVN: r241312

7 years agoFix indentation of experimental::shared_ptr code
Jonathan Wakely [Tue, 18 Oct 2016 18:41:43 +0000 (19:41 +0100)]
Fix indentation of experimental::shared_ptr code

* include/experimental/bits/shared_ptr.h: Fix indentation.

From-SVN: r241311

7 years agoFix typos in experimental::shared_ptr
Jonathan Wakely [Tue, 18 Oct 2016 18:30:38 +0000 (19:30 +0100)]
Fix typos in experimental::shared_ptr

* include/experimental/bits/shared_ptr.h (shared_ptr(shared_ptr&&)):
Remove const from parameter.
(operator<(const shared_ptr<T>&, nullptr_t)): Use correct
specialization of std::less.
* testsuite/experimental/memory/shared_ptr/comparison/comparison.cc:
Test comparison with nullptr and actually call test functions.

From-SVN: r241310

7 years agore PR middle-end/65950 (exit in main is causing the path to it to become unlikely.)
Andrew Pinski [Tue, 18 Oct 2016 15:42:21 +0000 (15:42 +0000)]
re PR middle-end/65950 (exit in main is causing the path to it to become unlikely.)

2016-10-18  Andrew Pinski  <apinski@cavium.com>

        PR tree-opt/65950
        * predict.c (is_exit_with_zero_arg): New function.
        (tree_bb_level_predictions): Don't consider paths leading to exit(0)
        as nottaken.

From-SVN: r241309

7 years agore PR target/77991 (ICE on x32 in plus_constant, at explow.c:87)
Uros Bizjak [Tue, 18 Oct 2016 14:39:39 +0000 (16:39 +0200)]
re PR target/77991 (ICE on x32 in plus_constant, at explow.c:87)

PR target/77991
* config/i386/i386.c (legitimize_tls_address)
<case TLS_MODEL_INITIAL_EXEC>: For TARGET_64BIT || TARGET_ANY_GNU_TLS
convert dest to Pmode if different than Pmode.

testsuite/ChangeLog:

PR target/77991
* gcc.target/i386/pr77991.c: New test.

From-SVN: r241308

7 years agoruntime: copy netpoll code from Go 1.7 runtime
Ian Lance Taylor [Tue, 18 Oct 2016 14:38:29 +0000 (14:38 +0000)]
runtime: copy netpoll code from Go 1.7 runtime

    Reviewed-on: https://go-review.googlesource.com/31325

From-SVN: r241307

7 years agoSet gcc_force_conventional_output even without LTO linker plugin
Matthew Fortune [Tue, 18 Oct 2016 14:12:58 +0000 (14:12 +0000)]
Set gcc_force_conventional_output even without LTO linker plugin

gcc/testsuite/

* lib/gcc-dg.exp: Set gcc_force_conventional_output whenever
LTO is used.

Set gcc_force_conventional_output even without LTO linker plugin

From-SVN: r241306

7 years agore PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operand...
Bill Schmidt [Tue, 18 Oct 2016 13:35:19 +0000 (13:35 +0000)]
re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operands to plus/minus)

2016-10-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/77916
* gimple-ssa-strength-reduction.c (analyze_increments): Reinstate
stopgap fix, as pointers with -1 increment are still broken.

From-SVN: r241305

7 years agoruntime: scan caller-saved registers for non-split-stack
Ian Lance Taylor [Tue, 18 Oct 2016 13:29:37 +0000 (13:29 +0000)]
runtime: scan caller-saved registers for non-split-stack

    While testing a patch on Solaris, which does not support split-stack, I
    ran across a bug in the handling of caller-saved registers for the
    garbage collector.  For non-split-stack systems, runtime_mcall is
    responsible for saving all caller-saved registers on the stack so that
    the GC stack scan will see them.  It does this by calling
    __builtin_unwind_init and setting the g's gcnextsp field to point to the
    current stack.  The garbage collector then scans the stack from gcnextsp
    to the top of stack.

    Unfortunately, the code was setting gcnextsp to point to runtime_mcall's
    argument, which meant that even though runtime_mcall was careful to
    store all caller-saved registers on the stack, the GC never saw them.
    This is, of course, only a problem if a value lives only in a
    caller-saved register, and not anywhere else on the stack or heap.  And
    it is only a problem if that caller-saved register manages to make it
    all the way down to runtime_mcall without being saved by any function on
    the way.  This is moderately unlikely but it turns out that the recent
    changes to keep values on the stack when compiling the runtime package
    caused it to happen for the local variable `s` in `notifyListWait` in
    runtime/sema.go.  That function calls goparkunlock which is simple
    enough to not require all registers, and itself calls runtime_mcall.  So
    it was possible for `s` to be released by the GC before the goroutine
    returned from goparkunlock, which eventually caused a dangling pointer
    to be passed to releaseSudog.

    This is not a problem on split-stack systems, which use
    __splitstack_get_context, which saves a stack pointer low enough on the
    stack to scan the registers saved by runtime_mcall.

    Reviewed-on: https://go-review.googlesource.com/31323

From-SVN: r241304

7 years agors6000.c (rs6000_output_symbol_ref): Move storage mapping class decoration from here...
David Edelsohn [Tue, 18 Oct 2016 13:28:16 +0000 (13:28 +0000)]
rs6000.c (rs6000_output_symbol_ref): Move storage mapping class decoration from here...

        * config/rs6000/rs6000.c (rs6000_output_symbol_ref): Move storage
        mapping class decoration from here...
        (rs6000_xcoff_encode_section): ...to here.

        (rs6000_savres_strategy) [AIX,ELFv2]: Inline FPR save and restore
        if shrink-wrapping and optimizing for speed.

From-SVN: r241303

7 years agoReturn earlier if not effective_target_int32
Senthil Kumar Selvaraj [Tue, 18 Oct 2016 11:58:52 +0000 (11:58 +0000)]
Return earlier if not effective_target_int32

Do early return *before* calling dg-init/torture-init. Returning
without calling dg-finish/torture-finish messes up torture-options for
subsequent tests.

gcc/testsuite/
2016-10-18  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/sso/sso.exp: Return early if not
effective_target_int32.

From-SVN: r241302

7 years agoDon't define uses-allocator variable templates in C++11
Jonathan Wakely [Tue, 18 Oct 2016 11:42:18 +0000 (12:42 +0100)]
Don't define uses-allocator variable templates in C++11

* include/bits/uses_allocator.h (__is_uses_allocator_constructible_v)
(__is_nothrow_uses_allocator_constructible_v): Only define for C++14
and later.

From-SVN: r241301

7 years agotree-vrp.c (evrp_dom_walker::before_dom_children): Handle not visited but non-executa...
Richard Biener [Tue, 18 Oct 2016 11:02:24 +0000 (11:02 +0000)]
tree-vrp.c (evrp_dom_walker::before_dom_children): Handle not visited but non-executable predecessors.

2016-10-18  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (evrp_dom_walker::before_dom_children): Handle
not visited but non-executable predecessors.  Return taken edge.
Simplify conditions and refactor propagation vs. folding step.

* gcc.dg/tree-ssa/pr20318.c: Disable EVRP.
* gcc.dg/tree-ssa/pr21001.c: Likewise.
* gcc.dg/tree-ssa/pr21090.c: Likewise.
* gcc.dg/tree-ssa/pr21294.c: Likewise.
* gcc.dg/tree-ssa/pr21563.c: Likewise.
* gcc.dg/tree-ssa/pr23744.c: Likewise.
* gcc.dg/tree-ssa/pr25382.c: Likewise.
* gcc.dg/tree-ssa/pr68431.c: Likewise.
* gcc.dg/tree-ssa/vrp03.c: Likewise.
* gcc.dg/tree-ssa/vrp06.c: Likewise.
* gcc.dg/tree-ssa/vrp07.c: Likewise.
* gcc.dg/tree-ssa/vrp09.c: Likewise.
* gcc.dg/tree-ssa/vrp19.c: Likewise.
* gcc.dg/tree-ssa/vrp20.c: Likewise.
* gcc.dg/tree-ssa/vrp92.c: Likewise.
* gcc.dg/pr68217.c: Likewise.
* gcc.dg/predict-9.c: Likewise.
* gcc.dg/tree-prof/val-prof-5.c: Adjust.
* gcc.dg/predict-1.c: Likewise.

From-SVN: r241300

7 years agors6000: Fix separate shrink-wrapping for TARGET_MULTIPLE
Segher Boessenkool [Tue, 18 Oct 2016 08:00:00 +0000 (10:00 +0200)]
rs6000: Fix separate shrink-wrapping for TARGET_MULTIPLE

We cannot use {SAVE,REST}_MULTIPLE and separate shrink-wrapping together,
not without checking when actually emitting the prologue/epilogue that the
registers to save/restore are actually still one contiguous block up to
(and including) 31.  So either:

1) We delay the decision of whether to use lmw/stmw to later;
2) We disallow shrink-wrapping separate (integer) components when those
strategies are selected; or
3) We don't use those strategies if we use separate shrink-wrapping.

This patch does 3).  In the long term it may be best to do 1) instead,
it can be slightly more efficient.

This caused problems on darwin (it is the only config that uses lmw/stmw
instructions by default).

* config/rs6000/rs6000.c (rs6000_savres_strategy): Do not select
{SAVE,REST}_MULTIPLE if shrink-wrapping separate components.
(rs6000_get_separate_components): Assert we do not have those
strategies selected.

From-SVN: r241297

7 years agotree-ssa-propagate.h (substitute_and_fold): Adjust prototype.
Richard Biener [Tue, 18 Oct 2016 07:49:32 +0000 (07:49 +0000)]
tree-ssa-propagate.h (substitute_and_fold): Adjust prototype.

2016-10-18  Richard Biener  <rguenther@suse.de>

* tree-ssa-propagate.h (substitute_and_fold): Adjust prototype.
* tree-ssa-propagate.c (ssa_prop_fini): Remove final BB_VISITED
clearing.
(substitute_and_fold_dom_walker): Adjust constructor.
(substitute_and_fold_dom_walker::before_dom_children): Remove
do_dce flag and handling (always true).
(substitute_and_fold): Likewise.
* tree-vrp.c (vrp_finalize): Adjust.
(execute_early_vrp): Remove final BB_VISITED clearing.
* tree-ssa-ccp.c (ccp_finalize): Adjust.
* tree-ssa-copy.c (fini_copy_prop): Likewise.
* ira.c (ira): Call clear_bb_flags.

From-SVN: r241296

7 years agogenmatch.c (dt_operand::gen_gimple_expr): Use get_name to get at the operand to look...
Richard Biener [Tue, 18 Oct 2016 07:25:40 +0000 (07:25 +0000)]
genmatch.c (dt_operand::gen_gimple_expr): Use get_name to get at the operand to look at with TREE_OPERAND for generic...

2016-10-18  Richard Biener  <rguenther@suse.de>

* genmatch.c (dt_operand::gen_gimple_expr): Use get_name to
get at the operand to look at with TREE_OPERAND for generic
sub-nodes.

From-SVN: r241295

7 years agore PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO))
Jerry DeLisle [Tue, 18 Oct 2016 04:14:25 +0000 (04:14 +0000)]
re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO))

2016-10-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/48298
* io/io.h: Move size_used from dtp to unit structure. Add bool
has_size to unit structure.
* read.c (read_x): Use has_size and size_used.
* transfer.c (read_sf_internal,read_sf,read_block_form,
read_block_form4): Likewise.
(data_transfer_init): If parent, initialize the size variables.
(finalize_transfer): Set the size variable using size_used in
gfc_unit. (write_block): Delete bogus/dead code.

* gfortran.dg/dtio_17.f90: New test.

From-SVN: r241294

7 years agoread-md.c: Move various state to within class rtx_reader
David Malcolm [Tue, 18 Oct 2016 00:19:17 +0000 (00:19 +0000)]
read-md.c: Move various state to within class rtx_reader

gcc/ChangeLog:
* genattrtab.c (attr_string): Use rtx_reader_ptr for call to
copy_md_ptr_loc.
(gen_attr): Use rtx_reader_ptr for lookup_enum_type call.
(write_test_expr): Use rtx_reader_ptr for calls to
fprint_c_condition.
(write_attr_value): Likewise.
* genconditions.c (write_one_condition): Use rtx_reader_ptr for
call to print_md_ptr_loc.
(write_one_condition): Likewise for calls to print_c_condition.
* genconstants.c: Include "statistics.h" and "vec.h".
(main): Update for conversion to member functions.
* genemit.c (emit_c_code): Use rtx_reader_ptr for
call to print_md_ptr_loc.
* genenums.c: Include "statistics.h" and "vec.h".
(main): Update for conversion of traverse_enum_types to a method.
* genmddeps.c: Include "statistics.h" and "vec.h".
* genoutput.c (process_template): Use rtx_reader_ptr for call to
print_md_ptr_loc.
* genpreds.c (write_predicate_subfunction): Likewise.
(write_predicate_expr): Likewise for calls to print_c_condition.
* genrecog.c (print_test): Likewise.
* gensupport.c (process_rtx): Likewise for calls to
copy_md_ptr_loc and join_c_conditions.
(alter_test_for_insn): Likewise for call to join_c_conditions.
(process_substs_on_one_elem): Likewise.
(gen_mnemonic_setattr): Update for move of string_obstack to a
field of rtx_reader.
(mnemonic_htab_callback): Likewise.  Fix formatting.
(gen_mnemonic_attr): Likewise.
* gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls
to print_c_condition.
* read-md.c: Include "statistics.h" and "vec.h".
(string_obstack): Convert this global to field "m_string_obstack"
of class rtx_reader.
(ptr_locs): Likewise, as "m_ptr_locs".
(ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack".
(joined_conditions): Likewise, as "m_joined_conditions".
(joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack".
(md_constants): Likewise, as "m_md_constants".
(enum_types): Likewise, as "m_enum_types".
(set_md_ptr_loc): Convert to...
(rtx_reader::set_md_ptr_loc): ...member function.
(get_md_ptr_loc): Convert to...
(rtx_reader::get_md_ptr_loc): ...member function.
(copy_md_ptr_loc): Convert to...
(rtx_reader::copy_md_ptr_loc): ...member function.
(fprint_md_ptr_loc): Convert to...
(rtx_reader::fprint_md_ptr_loc): ...member function.
(print_md_ptr_loc): Convert to...
(rtx_reader::print_md_ptr_loc): ...member function.
(join_c_conditions): Convert to...
(rtx_reader::join_c_conditions): ...member function.
(fprint_c_condition): Convert to...
(rtx_reader::fprint_c_condition): ...member function.
(print_c_condition): Convert to...
(rtx_reader::print_c_condition): ...member function.
(read_name): Convert to...
(rtx_reader::read_name): ...member function.
(read_escape): Convert to...
(rtx_reader::read_escape): ...member function.
(read_quoted_string): Convert to...
(rtx_reader::read_quoted_string): ...member function.
(read_braced_string): Convert to...
(rtx_reader::read_braced_string): ...member function.
(read_string): Convert to...
(rtx_reader::read_string): ...member function.
(read_skip_construct): Convert to...
(rtx_reader::read_skip_construct): ...member function.
(handle_constants): Convert to...
(rtx_reader::handle_constants): ...member function.
(traverse_md_constants): Convert to...
(rtx_reader::traverse_md_constants): ...member function.
(handle_enum): Convert to...
(rtx_reader::handle_enum): ...member function.
(lookup_enum_type): Convert to...
(rtx_reader::lookup_enum_type): ...member function.
(traverse_enum_types): Convert to...
(rtx_reader::traverse_enum_types): ...member function.
(rtx_reader::rtx_reader): Move initializations
of various former global data from rtx_reader::read_md_files to
here, as fields, along with the call to unlock_std_streams.
(rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up
the new fields.
(rtx_reader::read_md_files): Move initializations of various
global data from here to the ctor.
* read-md.h (read_name): Convert to...
(rtx_reader::read_name): ...member function.
(rtx_reader::read_escape): New method decl.
(read_quoted_string): Convert to...
(rtx_reader::read_quoted_string): ...member function.
(rtx_reader::read_braced_string): New method decl.
(read_string): Convert to...
(rtx_reader::read_string): ...member function.
(rtx_reader::read_skip_construct): New method decl.
(rtx_reader::set_md_ptr_loc): New method decl.
(rtx_reader::get_md_ptr_loc): New method decl.
(copy_md_ptr_loc): Convert to...
(rtx_reader::copy_md_ptr_loc): ...member function.
(fprint_md_ptr_loc): Convert to...
(rtx_reader::fprint_md_ptr_loc): ...member function.
(print_md_ptr_loc): Convert to...
(rtx_reader::print_md_ptr_loc): ...member function.
(rtx_reader::lookup_enum_type): New method decl.
(rtx_reader::traverse_enum_types): New method decl.
(rtx_reader::handle_constants): New method decl.
(traverse_md_constants): Convert to...
(rtx_reader::traverse_md_constants): ...member function.
(rtx_reader::handle_enum): New method decl.
(rtx_reader::join_c_conditions): New method decl.
(fprint_c_condition): Convert to...
(rtx_reader::fprint_c_condition): ...member function.
(print_c_condition): Convert to...
(rtx_reader::print_c_condition): ...member function.
(rtx_reader::apply_iterator_to_string): New method decl.
(rtx_reader::copy_rtx_for_iterators): New method decl.
(rtx_reader::read_conditions): New method decl.
(rtx_reader::record_potential_iterator_use): New method decl.
(rtx_reader::read_mapping): New method decl.
(rtx_reader::read_rtx): New method decl.
(rtx_reader::read_rtx_code): New method decl.
(rtx_reader::read_rtx_operand): New method decl.
(rtx_reader::read_nested_rtx): New method decl.
(rtx_reader::read_rtx_variadic): New method decl.
(rtx_reader::get_string_obstack): New method.
(rtx_reader::get_md_constants): New method.
(string_obstack): Convert global variable decl to...
(rtx_reader::m_string_obstack): ...this new field.
(rtx_reader::m_ptr_locs): New field.
(rtx_reader::m_ptr_loc_obstack): New field.
(rtx_reader::m_joined_conditions): New field.
(rtx_reader::m_joined_conditions_obstack): New field.
(rtx_reader::m_md_constants): New field.
(rtx_reader::m_enum_types): New field.
* read-rtl.c (apply_iterator_to_string): Convert to...
(rtx_reader::apply_iterator_to_string): ...member function.
(copy_rtx_for_iterators): Convert to...
(rtx_reader::copy_rtx_for_iterators): ...member function.
(add_condition_to_string): Use rtx_reader_ptr for
calls join_c_conditions.
(apply_iterators): Use rtx_reader_ptr for calls to
join_c_conditions and copy_rtx_for_iterators.
(read_conditions): Convert to...
(rtx_reader::read_conditions): ...member function.
(record_potential_iterator_use): Convert to...
(rtx_reader::record_potential_iterator_use): ...member function.
(read_mapping): Convert to...
(rtx_reader::read_mapping): ...member function.
(read_subst_mapping): Use rtx_reader_ptr for read_string call.
(read_rtx): Convert to...
(rtx_reader::read_rtx): ...member function.
(read_rtx_code): Convert to...
(rtx_reader::read_rtx_code): ...member function.
(read_rtx_operand): Convert to...
(rtx_reader::read_rtx_operand): ...member function.  Update for move
of string_obstack to a field.
(read_nested_rtx): Convert to..
(rtx_reader::read_nested_rtx): ...member function.
(read_rtx_variadic): Convert to..
(rtx_reader::read_rtx_variadic): ...member function.

From-SVN: r241293

7 years agoDaily bump.
GCC Administrator [Tue, 18 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241292

7 years agoUse get_ptr_nonnull in tree-vrp
Kugan Vivekanandarajah [Mon, 17 Oct 2016 23:39:55 +0000 (23:39 +0000)]
Use get_ptr_nonnull in tree-vrp

Use get_ptr_nonnull in tree-vrp
gcc/testsuite/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* gcc.dg/ipa/vrp4.c: Adjust testcase.

gcc/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* tree-vrp.c (get_value_range): Check get_ptr_nonnull.

From-SVN: r241289

7 years agoUse get/set_ptr_nonnull in ipa-vrp
Kugan Vivekanandarajah [Mon, 17 Oct 2016 23:37:57 +0000 (23:37 +0000)]
Use get/set_ptr_nonnull in ipa-vrp

Use get/set_ptr_nonnull in ipa-vrp
gcc/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* ipa-prop.c (ipa_compute_jump_functions_for_edge): Set value range
for pointer type too.
(ipcp_update_vr): set_ptr_nonnull for pointer.

gcc/testsuite/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* gcc.dg/ipa/vrp4.c: New test.

From-SVN: r241288

7 years agoSet nonnull attribute to ptr_info_def based on VRP
Kugan Vivekanandarajah [Mon, 17 Oct 2016 23:35:48 +0000 (23:35 +0000)]
Set nonnull attribute to ptr_info_def based on VRP

Set nonnull attribute to ptr_info_def based on VRP
gcc/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* tree-ssa-alias.h (pt_solution_singleton_or_null_p): Renamed from
pt_solution_singleton_p.
* tree-ssa-ccp.c (fold_builtin_alloca_with_align): Use renamed
pt_solution_singleton_or_null_p from pt_solution_singleton_p.
* tree-ssa-structalias.c (find_what_p_points_to): Preserve
pointer nonnull computed by VRP.
Also Conservatively set pt.null to 1.
(pt_solution_reset): Conservatively set pt.null to 1.
(pt_solution_singleton_or_null_p): Renamed from
pt_solution_singleton_p.
* tree-ssanames.h (set_ptr_nonnull): Declare.
(get_ptr_nonnull): Likewise.
* tree-ssanames.c (set_ptr_nonnull): New.
(get_ptr_nonnull): Likewise.
* tree-vrp.c (vrp_finalize): Set ptr that are nonnull.
(evrp_dom_walker::before_dom_children): Likewise.

gcc/testsuite/ChangeLog:

2016-10-18  Kugan Vivekanandarajah  <kuganv@linaro.org>

* gcc.dg/torture/pr39074-2.c: Adjust testcase.
* gcc.dg/torture/pr39074.c: Likewise.

From-SVN: r241287

7 years agoi386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to...
Eric Botcazou [Mon, 17 Oct 2016 22:34:53 +0000 (22:34 +0000)]
i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to...

* config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to...
* config/i386/i386.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ...here.
* config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to...
* config/ia64/ia64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ...here.
* config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to.
* config/rs6000/rs6000.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ...here.
(rs6000_option_override_internal): Clear it if ABI_AIX.
* config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to...
* config/sparc/sparc.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ... here.

From-SVN: r241285

7 years agogimple-ssa-strength-reduction.c (record_increment): Remove garbage comment.
Bill Schmidt [Mon, 17 Oct 2016 22:31:16 +0000 (22:31 +0000)]
gimple-ssa-strength-reduction.c (record_increment): Remove garbage comment.

2016-10-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gimple-ssa-strength-reduction.c (record_increment): Remove
garbage comment.

From-SVN: r241284