platform/upstream/gcc.git
7 years agosse.md (sse_storehps, [...]): Require in condition that at least one operand is not...
Jakub Jelinek [Sun, 5 Mar 2017 21:41:10 +0000 (22:41 +0100)]
sse.md (sse_storehps, [...]): Require in condition that at least one operand is not a MEM.

* config/i386/sse.md (sse_storehps, sse_storelps,
avx_<castmode><avxsizesuffix>_<castmode>,
avx512f_<castmode><avxsizesuffix>_<castmode>,
avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
in condition that at least one operand is not a MEM.

From-SVN: r245904

7 years agoAdd std::scoped_lock for C++17
Jonathan Wakely [Sun, 5 Mar 2017 18:38:35 +0000 (18:38 +0000)]
Add std::scoped_lock for C++17

* doc/xml/manual/status_cxx2017.xml: Document P0156R2 status.
* doc/html/*: Regenerate.
* include/std/mutex (scoped_lock): Implement new C++17 template.
* testsuite/30_threads/scoped_lock/cons/1.cc: New test.
* testsuite/30_threads/scoped_lock/requirements/
explicit_instantiation.cc: New test.
* testsuite/30_threads/scoped_lock/requirements/typedefs.cc: New test.

From-SVN: r245903

7 years agore PR c++/70266 (ICE on invalid code on x86_64-linux-gnu: unexpected expression ...
Paolo Carlini [Sun, 5 Mar 2017 17:13:16 +0000 (17:13 +0000)]
re PR c++/70266 (ICE on invalid code on x86_64-linux-gnu: unexpected expression ‘foo’ of kind overload)

/cp
2017-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/70266
* except.c (build_must_not_throw_expr): Perform the implicit
conversions on the condition.

/testsuite
2017-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/70266
* g++.dg/tm/pr70266.C: New.

From-SVN: r245901

7 years agocheck.c (positive_check): Add new function checking constant for being greater then...
Andre Vehreschild [Sun, 5 Mar 2017 11:35:47 +0000 (12:35 +0100)]
check.c (positive_check): Add new function checking constant for being greater then zero.

gcc/fortran/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

* check.c (positive_check): Add new function checking constant for
being greater then zero.
(gfc_check_image_status): Add checking of image_status arguments.
(gfc_check_failed_or_stopped_images): Same but for failed_- and
stopped_images function.
* dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
* gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
(enum gfc_isym_id): Added new intrinsic symbols.
(enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
* gfortran.texi: Added description for the new API functions. Updated
coverage of gfortran of TS18508.
* intrinsic.c (add_functions): Added symbols to resolve new intrinsic
functions.
* intrinsic.h: Added prototypes.
* iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
intrinsic.
(gfc_resolve_image_status): Same for image_status.
(gfc_resolve_stopped_images): Same for stopped_images.
* libgfortran.h: Added prototypes.
* match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
(gfc_match_fail_image): Match a FAIL IMAGE statement.
* match.h: Added prototype.
* parse.c (decode_statement): Added matching for FAIL IMAGE.
(next_statement): Same.
(gfc_ascii_statement): Same.
* resolve.c: Same.
* simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
single a constant result can be returne.d
(gfc_simplify_image_status): For COARRAY=single the result is constant.
* st.c (gfc_free_statement): Added FAIL_IMAGE handling.
* trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
new intrinsics.
* trans-expr.c (gfc_conv_procedure_call): This is first time all
arguments of a function are optional, which is now handled here
correctly.
* trans-intrinsic.c (conv_intrinsic_image_status): Translate
image_status.
(gfc_conv_intrinsic_function): Add support for image_status.
(gfc_is_intrinsic_libcall): Add support for the remaining new
intrinsics.
* trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
* trans-stmt.h: Add the prototype for the above.
* trans.c (trans_code): Dispatch for fail_image.
* trans.h: Add the trees for the new intrinsics.

libgfortran/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

* caf/libcaf.h: Added prototypes and stat codes for failed and stopped
images.
* caf/single.c (void _gfortran_caf_fail_image): Add the routine.
(int _gfortran_caf_image_status): Same.
(_gfortran_caf_failed_images): Same.
(_gfortran_caf_stopped_images): Same.

gcc/testsuite/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

* gfortran.dg/coarray/fail_image_1.f08: New test.
* gfortran.dg/coarray/fail_image_2.f08: New test.
* gfortran.dg/coarray/failed_images_1.f08: New test.
* gfortran.dg/coarray/failed_images_2.f08: New test.
* gfortran.dg/coarray/image_status_1.f08: New test.
* gfortran.dg/coarray/image_status_2.f08: New test.
* gfortran.dg/coarray/stopped_images_1.f08: New test.
* gfortran.dg/coarray/stopped_images_2.f08: New test.
* gfortran.dg/coarray_fail_st.f90: New test.
* gfortran.dg/coarray_failed_images_1.f08: New test.
* gfortran.dg/coarray_image_status_1.f08: New test.
* gfortran.dg/coarray_stopped_images_1.f08: New test.

From-SVN: r245900

7 years agoDaily bump.
GCC Administrator [Sun, 5 Mar 2017 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245897

7 years agoc.opt (Wnoexcept-type): New.
Jason Merrill [Sat, 4 Mar 2017 19:21:38 +0000 (14:21 -0500)]
c.opt (Wnoexcept-type): New.

* c.opt (Wnoexcept-type): New.

gcc/cp/
* mangle.c (mangle_decl): Check -Wnoexcept-type instead of
-Wc++1z-compat.

From-SVN: r245894

7 years agore PR c/79847 (diagnostics: missing space in "implicit declaration of function")
Marek Polacek [Sat, 4 Mar 2017 11:04:50 +0000 (11:04 +0000)]
re PR c/79847 (diagnostics: missing space in "implicit declaration of function")

PR c/79847
* c-decl.c (implicit_decl_warning): Add missing space.

From-SVN: r245893

7 years agoCore issues 2273 and 2277
Jason Merrill [Sat, 4 Mar 2017 08:12:28 +0000 (03:12 -0500)]
Core issues 2273 and 2277

* call.c (joust): Adjust using-declaration tiebreaker to handle
the intermediate base case.
* method.c (strip_inheriting_ctors): Just return the argument if
!flag_new_inheriting_ctors.

From-SVN: r245892

7 years agore PR fortran/79841 (Inconsistent diagnostics in fortran/openmp.c, function check_sym...
Jerry DeLisle [Sat, 4 Mar 2017 03:13:34 +0000 (03:13 +0000)]
re PR fortran/79841 (Inconsistent diagnostics in fortran/openmp.c, function check_symbol_not_pointer)

2017-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/79841
* openmp.c (check_symbol_not_pointer): Adjust diagnostic.

From-SVN: r245891

7 years agoDaily bump.
GCC Administrator [Sat, 4 Mar 2017 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245890

7 years ago* de.po: Update.
Joseph Myers [Fri, 3 Mar 2017 23:48:40 +0000 (23:48 +0000)]
* de.po: Update.

From-SVN: r245887

7 years agore PR c/79758 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark...
Marek Polacek [Fri, 3 Mar 2017 22:19:24 +0000 (22:19 +0000)]
re PR c/79758 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973)

PR c/79758
* c-decl.c (store_parm_decls_oldstyle): Check if the element of
current_function_prototype_arg_types is error_mark_node.  Fix
formatting.  Use TREE_VALUE instead of TREE_TYPE.

* gcc.dg/noncompile/pr79758.c: New test.

From-SVN: r245886

7 years agore PR c/79837 (incomplete diagnostic in c-parser: expected +, *, -, &, ^, |, &&,...
Jakub Jelinek [Fri, 3 Mar 2017 20:16:58 +0000 (21:16 +0100)]
re PR c/79837 (incomplete diagnostic in c-parser: expected +, *, -, &, ^, |, &&, ||, min or identifier)

PR c/79837
* c-parser.c (c_parser_omp_clause_reduction): Don't mention
%<min%> or %<max%> in the diagnostics, instead mention identifier.
(c_parser_omp_declare_reduction): Don't mention %<min%> in the
diagnostics.

From-SVN: r245885

7 years agore PR c/79836 (typo in c/c-parser.c: pragma omp ordered)
Jakub Jelinek [Fri, 3 Mar 2017 19:56:54 +0000 (20:56 +0100)]
re PR c/79836 (typo in c/c-parser.c: pragma omp ordered)

PR c/79836
* c-parser.c (c_parser_generic_selection): Use %<_Generic%>
instead of %<_Generic>.
(c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
(c_parser_omp_target_exit_data): Use %<release%> instead of
%<release>.

From-SVN: r245883

7 years agore PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)
Jakub Jelinek [Fri, 3 Mar 2017 19:32:01 +0000 (20:32 +0100)]
re PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)

PR middle-end/79805
* internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
ECF_NOTHROW.
* gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
gimple_call_nothrow_p flag based on whether original builtin can throw.
If it can, emit following stmts on the fallthrough edge.
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
don't create new bb if inserting just debug stmts on the edge, try to
insert them on the fallthru bb or just reset debug stmts.

* g++.dg/opt/pr79805.C: New test.

From-SVN: r245882

7 years agors6000: Fix for -mwarn-cell-microcode (PR43763)
Segher Boessenkool [Fri, 3 Mar 2017 17:00:50 +0000 (18:00 +0100)]
rs6000: Fix for -mwarn-cell-microcode (PR43763)

If using -mwarn-cell-microcode, rs6000_final_prescan_insn calls
get_insn_template to get the name of the machine instruction.  But,
get_insn_template calls the output template if that is code, and that
then can modify recog_data (it is normal to change the operands, for
example).

This patch saves and restores recog_data around the call to
get_insn_template to fix the problems this causes.

PR target/43763
* config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
restore recog_data (including the operand rtxes inside it) around
the call to get_insn_template.

From-SVN: r245880

7 years agoavx512vpopcntdq-check.h: New.
Andrew Senkevich [Fri, 3 Mar 2017 16:55:31 +0000 (16:55 +0000)]
avx512vpopcntdq-check.h: New.

* gcc.target/i386/avx512vpopcntdq-check.h: New.
* gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c: Ditto.
* gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c: Ditto.
* gcc.target/i386/avx512f-helper.h: Add avx512vpopcntdq-check.h.
* gcc.target/i386/i386.exp
(check_effective_target_avx512vpopcntdq): New.

From-SVN: r245879

7 years agoPR tree-optimization/79699 - small memory leak in MPFR
Martin Sebor [Fri, 3 Mar 2017 16:35:00 +0000 (16:35 +0000)]
PR tree-optimization/79699 - small memory leak in MPFR

gcc/ChangeLog:
* context.c (context::~context): Free MPFR caches to avoid
a memory leak on program exit.

From-SVN: r245878

7 years ago[AArch64] Fix bootstrap due to wide_int .elt (0) uninit warning
Kyrylo Tkachov [Fri, 3 Mar 2017 16:32:01 +0000 (16:32 +0000)]
[AArch64] Fix bootstrap due to wide_int .elt (0) uninit warning

    * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
    Use wide_int::ulow () instead of .elt (0).

From-SVN: r245877

7 years agoi386.md (*pushtf): Change *roF constraint to *roC.
Uros Bizjak [Fri, 3 Mar 2017 16:19:34 +0000 (17:19 +0100)]
i386.md (*pushtf): Change *roF constraint to *roC.

* config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
(*pushxf): Limit oF constraint to 32bit targets and add oC
constraint for 64bit targets.
(pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
(*pushdf): Change rmF constraint to rmC.

From-SVN: r245876

7 years ago* gcc_release (snapshot_print): Replace md5 checksum by sha256.
Gerald Pfeifer [Fri, 3 Mar 2017 14:12:04 +0000 (14:12 +0000)]
* gcc_release (snapshot_print): Replace md5 checksum by sha256.

From-SVN: r245875

7 years agoMIPS: Fix register mode checking for n64 in pr68273.c.
Toma Tabacu [Fri, 3 Mar 2017 13:23:53 +0000 (13:23 +0000)]
MIPS: Fix register mode checking for n64 in pr68273.c.

gcc/testsuite/

* gcc.target/mips/pr68273.c (dg-final): Match SImode registers only for
ilp32 targets and match DImode registers for lp64 targets.

From-SVN: r245874

7 years agoRemove unused variable.
Martin Liska [Fri, 3 Mar 2017 12:53:13 +0000 (13:53 +0100)]
Remove unused variable.

2017-03-03  Martin Liska  <mliska@suse.cz>

* tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
Remove unused variable.

From-SVN: r245873

7 years agopr71624.C: Disable for x32.
Uros Bizjak [Fri, 3 Mar 2017 12:26:16 +0000 (13:26 +0100)]
pr71624.C: Disable for x32.

* g++.dg/pr71624.C: Disable for x32.
* g++.dg/pr71633.C: Ditto.

From-SVN: r245872

7 years agore PR target/79807 (ICE in extract_insn, at recog.c:2311 (error: unrecognizable insn))
Jakub Jelinek [Fri, 3 Mar 2017 12:24:53 +0000 (13:24 +0100)]
re PR target/79807 (ICE in extract_insn, at recog.c:2311 (error: unrecognizable insn))

PR target/79807
* config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
is a memory operand, increase num_memory.
(ix86_expand_args_builtin): Likewise.

* gcc.target/i386/pr79807.c: New test.

From-SVN: r245871

7 years agoProperly handle __cxa_pure_virtual visibility (PR lto/79760).
Jan Hubicka [Fri, 3 Mar 2017 11:58:03 +0000 (12:58 +0100)]
Properly handle __cxa_pure_virtual visibility (PR lto/79760).

2017-03-03  Jan Hubicka  <jh@suse.cz>

PR lto/79760
* ipa-devirt.c (maybe_record_node): Properly handle
__cxa_pure_virtual visibility.

From-SVN: r245870

7 years agoAdd -Wdisabled-optimization to loop prefetching pass (PR tree-optimization/79803).
Martin Liska [Fri, 3 Mar 2017 11:53:56 +0000 (12:53 +0100)]
Add -Wdisabled-optimization to loop prefetching pass (PR tree-optimization/79803).

2017-03-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79803
* tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
assert.
(pass_loop_prefetch::execute): Disabled optimization if an
assumption about L1 cache size is not met.
2017-03-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79803
* gcc.dg/tree-ssa/pr79803.c: New test.

From-SVN: r245869

7 years agoGCSE: Use HOST_WIDE_INT instead of int (PR rtl-optimization/79574).
Martin Liska [Fri, 3 Mar 2017 11:53:14 +0000 (12:53 +0100)]
GCSE: Use HOST_WIDE_INT instead of int (PR rtl-optimization/79574).

2017-03-03  Martin Liska  <mliska@suse.cz>

PR rtl-optimization/79574
* gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
(hash_scan_set): Likewise.
(dump_hash_table): Likewise.
(hoist_code): Likewise.
2017-03-03  Martin Liska  <mliska@suse.cz>

PR rtl-optimization/79574
* gcc.dg/pr79574-2.c: New test.

From-SVN: r245868

7 years agofixed-value.c (fixed_from_string): Restore use of elt (1) in place of uhigh ().
Richard Biener [Fri, 3 Mar 2017 11:32:38 +0000 (11:32 +0000)]
fixed-value.c (fixed_from_string): Restore use of elt (1) in place of uhigh ().

2017-03-03  Richard Biener  <rguenther@suse.de>

* fixed-value.c (fixed_from_string): Restore use of elt (1)
in place of uhigh ().
(fixed_convert_from_real): Likewise.

From-SVN: r245867

7 years agore PR c++/79825 (Uninitialized uses in aggregate copies of empty structs (missed...
Richard Biener [Fri, 3 Mar 2017 11:30:32 +0000 (11:30 +0000)]
re PR c++/79825 (Uninitialized uses in aggregate copies of empty structs (missed DCE in C++ gimplify))

2017-03-03  Richard Biener  <rguenther@suse.de>

PR c++/79825
* cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR.

* g++.dg/warn/Wuninitialized-8.C: New testcase.

From-SVN: r245866

7 years ago* gcc.dg/pr57134.c: Use empty inline asm string literal.
Jakub Jelinek [Fri, 3 Mar 2017 10:41:49 +0000 (11:41 +0100)]
* gcc.dg/pr57134.c: Use empty inline asm string literal.

From-SVN: r245865

7 years agore PR c++/79791 (-Werror=write-strings ignored with -Wpedantic)
Marek Polacek [Fri, 3 Mar 2017 09:58:10 +0000 (09:58 +0000)]
re PR c++/79791 (-Werror=write-strings ignored with -Wpedantic)

PR c++/79791
* typeck.c (string_conv_p): In C++11, always call pedwarn with
OPT_Wwrite_strings.

* g++.dg/warn/Wwrite-strings-1.C: New test.
* g++.dg/warn/Wwrite-strings-2.C: New test.
* g++.dg/warn/Wwrite-strings-3.C: New test.
* g++.dg/warn/Wwrite-strings-4.C: New test.
* g++.dg/warn/Wwrite-strings-5.C: New test.
* g++.dg/warn/Wwrite-strings-6.C: New test.
* g++.dg/warn/Wwrite-strings-7.C: New test.
* g++.dg/warn/Wwrite-strings-8.C: New test.
* g++.dg/warn/Wwrite-strings-9.C: New test.
* g++.dg/warn/Wwrite-strings-10.C: New test.
* g++.dg/warn/Wwrite-strings-11.C: New test.
* g++.dg/warn/Wwrite-strings-12.C: New test.

From-SVN: r245864

7 years agore PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)
Uros Bizjak [Fri, 3 Mar 2017 09:18:01 +0000 (10:18 +0100)]
re PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)

PR target/79514
* config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.

From-SVN: r245861

7 years agore PR middle-end/79818 (wrong code with -fwrapv and -Os/-O1/-O2/-O3)
Richard Biener [Fri, 3 Mar 2017 08:08:08 +0000 (08:08 +0000)]
re PR middle-end/79818 (wrong code with -fwrapv and -Os/-O1/-O2/-O3)

2017-03-03  Richard Biener  <rguenther@suse.de>

PR middle-end/79818
* match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
TYPE_OVERFLOW_UNDEFINED check.

* gcc.dg/torture/pr79818.c: New testcase.

From-SVN: r245860

7 years agoUpdate overload resolution with deduction guides.
Jason Merrill [Fri, 3 Mar 2017 07:31:54 +0000 (02:31 -0500)]
Update overload resolution with deduction guides.

* pt.c (do_class_deduction): Always build the copy guide.
(copy_guide_p, template_guide_p): New.
(build_deduction_guide): Remember the original constructor.
* call.c (joust): Prefer the copy guide and non-template guides.

From-SVN: r245859

7 years agoAllow deduction guides to look into primary template.
Jason Merrill [Fri, 3 Mar 2017 01:26:47 +0000 (20:26 -0500)]
Allow deduction guides to look into primary template.

* cp-tree.h (struct saved_scope): Add deduction_guide_type.
(struct cp_decl_specifier_seq): Add constructor_p.
* parser.c (cp_parser_decl_specifier_seq): Set constructor_p.
(cp_parser_init_declarator): Check it.  Set ctor_dtor_or_conv_p.
Clear deduction_guide_type.  Don't handle deduction guide names.
(cp_parser_declarator): Don't clear ctor_dtor_or_conv_p.
(cp_parser_direct_declarator): Likewise.  Handle deduction guides.
(cp_parser_member_declaration, cp_parser_cache_defarg)
(cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p.
* pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change.
(build_deduction_guide): Set deduction_guide_type.
(dependent_scope_p): Check deduction_guide_type.
* search.c (lookup_member): Likewise.

From-SVN: r245858

7 years agoDaily bump.
GCC Administrator [Fri, 3 Mar 2017 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245857

7 years agore PR c++/79782 (ICE: tree check: expected tree_list, have void_type in emit_mem_init...
Jakub Jelinek [Thu, 2 Mar 2017 21:31:40 +0000 (22:31 +0100)]
re PR c++/79782 (ICE: tree check: expected tree_list, have void_type in emit_mem_initializers, at cp/init.c:1225)

PR c++/79782
* init.c (mark_exp_read_r): New function.
(emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on
whole arguments instead of plain mark_exp_read on TREE_LIST values.

* g++.dg/warn/Wunused-parm-10.C: New test.

From-SVN: r245853

7 years ago* da.po: Update.
Joseph Myers [Thu, 2 Mar 2017 21:06:47 +0000 (21:06 +0000)]
* da.po: Update.

From-SVN: r245852

7 years ago*.c: Test for "{ i?86-*-* x86_64-*-* } && lp64" targets only.
Uros Bizjak [Thu, 2 Mar 2017 19:32:32 +0000 (20:32 +0100)]
*.c: Test for "{ i?86-*-* x86_64-*-* } && lp64" targets only.

* gcc.dg/rtl/x86_64/*.c: Test for
"{ i?86-*-* x86_64-*-* } && lp64" targets only.

From-SVN: r245850

7 years agovector.md (vector_ne_<mode>_p): Correct operand numbers.
Bill Schmidt [Thu, 2 Mar 2017 19:17:04 +0000 (19:17 +0000)]
vector.md (vector_ne_<mode>_p): Correct operand numbers.

2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
numbers.
(vector_ae_<mode>_p): Likewise.
(vector_nez_<mode>_p): Likewise.
(vector_ne_v2di_p): Likewise.
(vector_ae_v2di_p): Likewise.
(vector_ne_<mode>_p): Likewise.
* config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
numbers.
(vsx_tsqrt<mode>2_fe): Likewise.

From-SVN: r245849

7 years agodebug_mode.xml: Update and simplify note on link- and run-time coexistence.
Gerald Pfeifer [Thu, 2 Mar 2017 19:11:50 +0000 (19:11 +0000)]
debug_mode.xml: Update and simplify note on link- and run-time coexistence.

* doc/xml/manual/debug_mode.xml: Update and simplify note
on link- and run-time coexistence.

Co-Authored-By: François Dumont <frs.dumont@gmail.com>
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r245848

7 years agoRename 17_intro/headers/names.cc test file
Jonathan Wakely [Thu, 2 Mar 2017 18:56:57 +0000 (18:56 +0000)]
Rename 17_intro/headers/names.cc test file

* testsuite/17_intro/headers/names.cc: Rename to ...
* testsuite/17_intro/names.cc: ... here.

From-SVN: r245845

7 years agore PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)
Uros Bizjak [Thu, 2 Mar 2017 18:47:03 +0000 (19:47 +0100)]
re PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)

PR target/79514
* config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.

testsuite/ChangeLog:

PR target/79514
* gcc.target/i386/pr79514.c: New test.

From-SVN: r245844

7 years agore PR rtl-optimization/79780 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error...
Jakub Jelinek [Thu, 2 Mar 2017 16:02:37 +0000 (17:02 +0100)]
re PR rtl-optimization/79780 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block))

PR rtl-optimization/79780
* cprop.c (one_cprop_pass): When second and further conditional trap
in a single basic block is turned into an unconditional trap, turn it
into a deleted note to avoid RTL verification failures.

* gcc.c-torture/compile/pr79780.c: New test.

From-SVN: r245843

7 years agofold-const.c (const_binop): Use ulow () instead of elt (0).
Richard Biener [Thu, 2 Mar 2017 14:38:47 +0000 (14:38 +0000)]
fold-const.c (const_binop): Use ulow () instead of elt (0).

2017-03-02  Richard Biener  <rguenther@suse.de>

* fold-const.c (const_binop): Use ulow () instead of elt (0).

From-SVN: r245841

7 years agore PR tree-optimization/79345 (passing yet-uninitialized member as argument to base...
Richard Biener [Thu, 2 Mar 2017 13:42:05 +0000 (13:42 +0000)]
re PR tree-optimization/79345 (passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized))

2017-03-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79345
PR c++/42000
* tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
param and abort the walk, returning -1 if it is hit.
(walk_aliased_vdefs): Take a limit param and pass it on.
* tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
defaulting to 0 and return a signed int.
* tree-ssa-uninit.c (struct check_defs_data): New struct.
(check_defs): New helper.
(warn_uninitialized_vars): Use walk_aliased_vdefs to warn
about uninitialized memory.

* fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
bogus uninitialized warning.
(fixed_convert_from_real): Likewise.

* g++.dg/warn/Wuninitialized-7.C: New testcase.
* c-c++-common/ubsan/bounds-2.c: Add -Wno-uninitialized.
* gcc.dg/uninit-pr19430-2.c: Add expected warning.

From-SVN: r245840

7 years agomatmul.m4 (matmul_'rtype_code`): Avoid race condition on storing function pointer.
Thomas Koenig [Thu, 2 Mar 2017 12:54:27 +0000 (12:54 +0000)]
matmul.m4 (matmul_'rtype_code`): Avoid race condition on storing function pointer.

2017-03-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
    Jakub Jelinek  <jakub@redhat.com>

* m4/matmul.m4 (matmul_'rtype_code`):  Avoid
race condition on storing function pointer.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r245839

7 years agore PR middle-end/79756 (ICE in execute_todo, at passes.c:2011)
Richard Biener [Thu, 2 Mar 2017 11:44:16 +0000 (11:44 +0000)]
re PR middle-end/79756 (ICE in execute_todo, at passes.c:2011)

2017-03-02  Richard Biener  <rguenther@suse.de>

PR c/79756
* c-common.c (c_common_mark_addressable_vec): Look through
C_MAYBE_CONST_EXPR.

* gcc.dg/vector-1.c: New testcase.

From-SVN: r245838

7 years agore PR tree-optimization/66768 (address space gets lost on literal pointer)
Bin Cheng [Thu, 2 Mar 2017 11:25:11 +0000 (11:25 +0000)]
re PR tree-optimization/66768 (address space gets lost on literal pointer)

PR tree-optimization/66768
* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
iv_use if base object can't be determined.

gcc/testsuite
* gcc.target/i386/pr66768.c: New test.

From-SVN: r245837

7 years agore PR libfortran/78379 (Processor-specific versions for matmul)
Thomas Koenig [Thu, 2 Mar 2017 11:04:01 +0000 (11:04 +0000)]
re PR libfortran/78379 (Processor-specific versions for matmul)

2017-03-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78379
* m4/matmul.m4: (matmul_'rtype_code`_avx2): Also generate for
reals.  Add fma to target options.
(matmul_'rtype_code`):  Call AVX2 only if FMA is available.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r245836

7 years agogthr-win32.h: Define NOGDI before windows.h include to prevent w32api CC_NONE macro...
Jonathan Yong [Thu, 2 Mar 2017 11:03:23 +0000 (11:03 +0000)]
gthr-win32.h: Define NOGDI before windows.h include to prevent w32api CC_NONE macro clash...

        * config/i386/gthr-win32.h: Define NOGDI before
        windows.h include to prevent w32api CC_NONE macro
        clash with libgfortran.

From-SVN: r245835

7 years agounwind-seh.c: Suppress warnings for RtlUnwindEx calls.
Jonathan Yong [Thu, 2 Mar 2017 11:00:28 +0000 (11:00 +0000)]
unwind-seh.c: Suppress warnings for RtlUnwindEx calls.

* unwind-seh.c: Suppress warnings for RtlUnwindEx calls.

From-SVN: r245834

7 years agore PR tree-optimization/79345 (passing yet-uninitialized member as argument to base...
Jakub Jelinek [Thu, 2 Mar 2017 09:19:28 +0000 (10:19 +0100)]
re PR tree-optimization/79345 (passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized))

PR tree-optimization/79345
* gensupport.h (struct pattern_stats): Add min_scratch_opno field.
* gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
(get_pattern_stats): Initialize it.
* genemit.c (gen_expand): Verify match_scratch numbers come after
match_operand/match_dup numbers.
* config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
match_scratch numbers.
* config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
Likewise.
* config/s390/s390.md (trunctdsd2): Likewise.

From-SVN: r245833

7 years agodfinit.c: Only run for lp64.
Richard Biener [Thu, 2 Mar 2017 08:20:19 +0000 (08:20 +0000)]
dfinit.c: Only run for lp64.

2017-03-02  Richard Biener  <rguenther@suse.de>

* gcc.dg/rtl/x86_64/dfinit.c: Only run for lp64.
* gcc.dg/rtl/x86_64/final.c: Likewise.
* gcc.dg/rtl/x86_64/into-cfglayout.c: Likewise.
* gcc.dg/rtl/x86_64/ira.c: Likewise.
* gcc.dg/rtl/x86_64/times-two.c.after-expand.c: Likewise.
* gcc.dg/rtl/x86_64/vregs.c: Likewise.

From-SVN: r245832

7 years agowide-int.h (wide_int_storage::operator=): Implement in terms of wi::copy.
Richard Biener [Thu, 2 Mar 2017 08:02:41 +0000 (08:02 +0000)]
wide-int.h (wide_int_storage::operator=): Implement in terms of wi::copy.

2017-03-02  Richard Biener  <rguenther@suse.de>

* wide-int.h (wide_int_storage::operator=): Implement in terms
of wi::copy.

From-SVN: r245831

7 years agore PR tree-optimization/79777 (ICE on -Os and above in on aarch64-linux-gnu (internal...
Richard Biener [Thu, 2 Mar 2017 07:53:42 +0000 (07:53 +0000)]
re PR tree-optimization/79777 (ICE on -Os and above in on aarch64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 }))

2017-03-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79777
* tree-ssa-pre.c (eliminate_insert): Give up if we simplify
the to insert expression to sth existing.

* gcc.dg/torture/pr79777.c: New testcase.

From-SVN: r245830

7 years agoPR libstdc++/79789 fix non-reserved names in headers
Jonathan Wakely [Thu, 2 Mar 2017 03:43:49 +0000 (03:43 +0000)]
PR libstdc++/79789 fix non-reserved names in headers

PR libstdc++/79789
* include/bits/hashtable_policy.h (__clp2): Use reserved names for
parameters and local variables.
* include/bits/ios_base.h (make_error_code, make_error_condition):
Likewise.
* include/bits/list.tcc (list::sort): Likewise.
* include/bits/mask_array.h (mask_array): Likewise.
* include/bits/regex.h (regex_token_iterator): Likewise.
* include/bits/slice_array.h (slice_array): Likewise.
* include/bits/stl_algo.h (__sample): Likewise.
* include/std/memory (undeclare_no_pointers): Likewise.
* include/std/type_traits (is_callable_v, is_nothrow_callable_v):
Likewise.
* libsupc++/exception_ptr.h (__dest_thunk): Likewise.
* testsuite/17_intro/headers/names.cc: New test.

From-SVN: r245828

7 years agoPR 79798 Fix incorrect use of std::result_of in std::bind
Jonathan Wakely [Thu, 2 Mar 2017 03:43:36 +0000 (03:43 +0000)]
PR 79798 Fix incorrect use of std::result_of in std::bind

PR libstdc++/79798
* include/std/functional (bind::_Res_type_impl): Fix incorrect use of
result_of that loses top-level cv-qualifiers.
* testsuite/20_util/bind/79798.cc: New test.

From-SVN: r245827

7 years agoClass template argument deduction in new-expression
Jason Merrill [Thu, 2 Mar 2017 01:58:30 +0000 (20:58 -0500)]
Class template argument deduction in new-expression

Class template argument deduction in new-expression
* init.c (build_new): Handle deduction from no initializer.
* parser.c (cp_parser_new_expression): Don't require a single
expression for class template deduction.
* typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
class template placeholder.
* pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
(tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
(redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.

From-SVN: r245826

7 years agoDaily bump.
GCC Administrator [Thu, 2 Mar 2017 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245825

7 years agoPR middle-end/79692 - [7 Regression] -Wformat-overflow false positive
Martin Sebor [Wed, 1 Mar 2017 23:39:59 +0000 (23:39 +0000)]
PR middle-end/79692 - [7 Regression] -Wformat-overflow false positive

gcc/ChangeLog:

PR middle-end/79692
* gimple-ssa-sprintf.c
(directive::known_width_and_precision): New function.
(format_integer): Use it.
(get_mpfr_format_length): Consider the full range of precision
when computing %g output with the # flag.  Set the likely byte
count to 3 rather than 1 when precision is indeterminate.
(format_floating): Correct the lower bound of precision.

gcc/testsuite/ChangeLog:

PR middle-end/79692
* gcc.dg/tree-ssa/builtin-sprintf-2.c: Add test cases.
* gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Correct %#g.
* gcc.dg/tree-ssa/builtin-sprintf-warn-15.c: New test.
* gcc.dg/tree-ssa/builtin-snprintf-3.c: Ditto.

From-SVN: r245822

7 years agoinvoke.texi: Document default code model for 64-bit Linux.
Bill Schmidt [Wed, 1 Mar 2017 23:14:26 +0000 (23:14 +0000)]
invoke.texi: Document default code model for 64-bit Linux.

2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* doc/invoke.texi: Document default code model for 64-bit Linux.

From-SVN: r245821

7 years ago* es.po: Update.
Joseph Myers [Wed, 1 Mar 2017 22:08:44 +0000 (22:08 +0000)]
* es.po: Update.

From-SVN: r245820

7 years agore PR target/79752 (incorrect code generation for __divkf3 with -O2 -mcpu=power9)
Aaron Sawdey [Wed, 1 Mar 2017 19:58:05 +0000 (19:58 +0000)]
re PR target/79752 (incorrect code generation for __divkf3 with -O2 -mcpu=power9)

2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

        PR target/79752
        * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
        udiv rather than div since input pattern is unsigned.

From-SVN: r245817

7 years agoi386.c (print_reg): Warn for values of unsupported size in integer register.
Uros Bizjak [Wed, 1 Mar 2017 19:24:53 +0000 (20:24 +0100)]
i386.c (print_reg): Warn for values of unsupported size in integer register.

* config/i386/i386.c (print_reg): Warn for values of
unsupported size in integer register.

testsuite/ChangeLog:

* gcc.target/i386/invsize-2.c: New test.
* gcc.target/i386/invsize-3.c: Ditto.
* gcc.target/i386/invsize-4.c: Ditto.
* gcc.target/i386/pr66274.c: Expect "unsuported size" warning.
* gcc.target/i386/stackalign/asm-1.c: Ditto.

From-SVN: r245815

7 years agocmd/go: add testdata/timeoutbench_test.go
Ian Lance Taylor [Wed, 1 Mar 2017 18:41:15 +0000 (18:41 +0000)]
cmd/go: add testdata/timeoutbench_test.go

This file was accidentally omitted from the update to the final Go 1.8.

From-SVN: r245814

7 years agore PR target/79439 (Missing nop instruction after recursive call corrupts TOC register)
Michael Meissner [Wed, 1 Mar 2017 18:33:21 +0000 (18:33 +0000)]
re PR target/79439 (Missing nop instruction after recursive call corrupts TOC register)

[gcc]
2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/79439
* config/rs6000/predicates.md (current_file_function_operand): Do
not allow self calls to be local if the function is replaceable.

[gcc/testsuite]
2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/79439
* gcc.target/powerpc/pr79439.c: New test.

From-SVN: r245813

7 years agopr79544.c: Add test for vec_vsrad and fix up scan string.
Pat Haugen [Wed, 1 Mar 2017 18:09:51 +0000 (18:09 +0000)]
pr79544.c: Add test for vec_vsrad and fix up scan string.

* gcc.target/powerpc/pr79544.c: Add test for vec_vsrad and fix up
scan string.

From-SVN: r245812

7 years agore PR target/79395 (Compile error with -mcpu=power9 and __builtin_vec_vcmpne_p)
Kelvin Nilsen [Wed, 1 Mar 2017 14:43:02 +0000 (14:43 +0000)]
re PR target/79395 (Compile error with -mcpu=power9 and __builtin_vec_vcmpne_p)

gcc/ChangeLog:

2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/79395
* config/rs6000/altivec.h (vec_ctz and others): Change the
preprocessor macro that controls conditional compilation from
_ARCH_PWR9 to __POWER9_VECTOR__.
(vec_all_ne): Change parameterization of __altivec_scalar_pred
macro expansion under preprocessor #ifdef __POWER9_VECTOR__
control (instead of _ARCH_PWR9 control) so that template
definition uses power9-specific function.
(vec_any_eq): Likewise.
(vec_all_ne): Change macro definition to use a power9-specific
expansion under #ifdef __POWER9_VECTOR__ control (instead of
_ARCH_PWR9 control).
(vec_any_eq) Likewise.
* config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
expansion for CMPNEF to remove support for xvcmpnesp instruction.
(CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
support for xvcmpnedp instruction.
(VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
macro expansion so that Power9 implementation of vec_all_ne does
not use the AltiVec predicate framework.
(VCMPNEH_P): Likewise.
(VCMPNEW_P): Likewise.
(VCMPNED_P): Likewise.
(VCMPNEFP_P): Likewise.
(VCMPNEDP_P): Likewise.
(VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
implementation of vec_any_eq to not use AltiVec predicate
framework.
(VCMPAEH_P): Likewise.
(VCMPAEW_P): Likewise.
(VCMPAED_P): Likewise.
(VCMPAEFP_P): Likewise.
(VCMPAEDP_P): Likewise.
(VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
not use the AltiVec predicate framework.
(VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
of vec_any_eq to not use AltiVec predicate framework.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
support for predefined __POWER9_VECTOR__ macro to indicate that
Power9 instruction selection is enabled.
(altivec_overloaded_builtins): Remove extraneous
ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
function argument types RS6000_BTI_bool_V16QI and
RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
entry for overloaded function argument types RS6000_BTI_bool_V4SI
andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
P9V_BUILTIN_CMPNEF to force use of instructions not specific to
Power9 for implementations of vec_cmpne.  Change the signature for
all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
(representing vec_all_ne) to remove the previously described first
argument of type RS6000_BTI_INTSI, as this was an artifact of
reliance on the AltiVec predicate framework, which is no longer
used in the implementation of these functions.  Add
P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
since, unlike the AltiVec predicate framework implementation, we
do not share function descriptors between vec_alle and vec_anyeq.
(altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
set of modes that receive special treatment even when
TARGET_P9_VECTOR is true.  The special treatment emits code that
does not depend on Power9 instructions.
* config/rs6000/vector.md (vector_ne_<mode>_p): Change this
define_expand to not rely on AltiVec predicate framework.
(vector_ae_<mode>p): New define_expand to represent vec_any_eq
function.
(vector_ne_v2di_p): Change this define_expand to not rely on
AltiVec predicate framework.
(vector_ae_v2di_p): New define_expand to represent vec_any_eq
function.
(vector_ne_<mode>_p): Change this define_expand to not rely on
AltiVec predicate framework.
(vector_ae_<mode>p): New define_expand to represent vec_any_eq
function.
* config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
(V16QI, V8HI, V4SI), correct a typo in the code emitted for this
define_insn pattern.
(*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
define_insn pattern because the xvcmpne<VSs>. instruction is not
supported.
(vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
instruction is not supported.

gcc/testsuite/ChangeLog:

2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/79395
* gcc.target/powerpc/vsu/vec-all-ne-10.c: Change scan-assembler
pattern to look for vcmpequd. instead of vcmpnew.
* gcc.target/powerpc/vsu/vec-all-ne-14.c: Likewise.
* gcc.target/powerpc/vsu/vec-all-ne-7.c: Change scan-assembler
pattern to look for xvcmpeqsp. instead of xvcmpnesp.
* gcc.target/powerpc/vsu/vec-all-ne-8.c: Change scan-assembler to
look for xvcmpeqdp. instead of xvcmpnedp.
* gcc.target/powerpc/vsu/vec-all-ne-9.c: Change scan-assembler to
look for vcmpequd. instead of vcmpnew.
* gcc.target/powerpc/vsu/vec-any-eq-10.c: Likewise.
* gcc.target/powerpc/vsu/vec-any-eq-14.c: Likewise.
* gcc.target/powerpc/vsu/vec-any-eq-7.c: Change scan-assembler to
look for xvcmpeqsp. instead of xvcmpnesp.
* gcc.target/powerpc/vsu/vec-any-eq-8.c: Change scan-assembler to
look for xvcmpeqdp. instead of xvcmpnedp.
* gcc.target/powerpc/vsu/vec-any-eq-9.c: Change scan-assembler to
look for vcmpequd. instead of vcmpnew.
* gcc.target/powerpc/vsu/vec-cmpne-8.c: Change scan-assembler to
look for vcmpeqsp instead of xvcmpnesp.
* gcc.target/powerpc/vsu/vec-cmpne-9.c: Change scan-assembler to
look for xvcmpeqdp instead of xvcmpnedp.

From-SVN: r245811

7 years agodocumentation_hacking.xml: Tweak link to doxygen.org.
Gerald Pfeifer [Wed, 1 Mar 2017 12:53:28 +0000 (12:53 +0000)]
documentation_hacking.xml: Tweak link to doxygen.org.

* doc/xml/manual/documentation_hacking.xml: Tweak link to
doxygen.org.

From-SVN: r245808

7 years ago* config/nvptx/nvptx.c: Include intl.h.
Jakub Jelinek [Wed, 1 Mar 2017 10:25:49 +0000 (11:25 +0100)]
* config/nvptx/nvptx.c: Include intl.h.

From-SVN: r245806

7 years ago[PR 78140] Reuse same IPA bits and VR info
Martin Jambor [Wed, 1 Mar 2017 09:37:27 +0000 (10:37 +0100)]
[PR 78140] Reuse same IPA bits and VR info

2017-03-01  Martin Jambor  <mjambor@suse.cz>

PR lto/78140
* ipa-prop.h (ipa_bits): Removed field known.
(ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
to pointers.  Adjusted their comments to warn about their sharing.
(ipcp_transformation_summary): Change bits to a vector of pointers.
(ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
(ipa_get_ipa_bits_for_value): Declare.
* tree-vrp.h (value_range): Mark as GTY((for_user)).
* ipa-prop.c (ipa_bit_ggc_hash_traits): New.
(ipa_bits_hash_table): Likewise.
(ipa_vr_ggc_hash_traits): Likewise.
(ipa_vr_hash_table): Likewise.
(ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
being pointers and vr_known being removed.
(ipa_set_jf_unknown): Likewise.
(ipa_get_ipa_bits_for_value): New function.
(ipa_set_jfunc_bits): Likewise.
(ipa_get_value_range): New overloaded functions.
(ipa_set_jfunc_vr): Likewise.
(ipa_compute_jump_functions_for_edge): Use the above functions to
construct bits and vr parts of jump functions.
(ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
ipa_bits_hash_table and ipa_vr_hash_table if they do not already
exist.
(ipcp_grow_transformations_if_necessary): Also allocate
ipa_bits_hash_table and ipa_vr_hash_table if they do not already
exist.
(ipa_node_params_t::duplicate): Do not copy bits, just pointers to
them.  Fix too long lines.
(ipa_write_jump_function): Adjust for bits and m_vr being pointers and
vr_known being removed.
(ipa_read_jump_function): Use new setter functions to construct bits
and vr parts of jump functions or set them to NULL.
(write_ipcp_transformation_info): Adjust for bits being pointers.
(read_ipcp_transformation_info): Likewise.
(ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
space.
Include gt-ipa-prop.h.
* ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
being pointers.
(ipcp_store_bits_results): Likewise.
(propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
Do not write to existing jump functions but use a temporary instead.

From-SVN: r245805

7 years agore PR c++/79681 (ICE with constexpr and bitfield)
Jakub Jelinek [Wed, 1 Mar 2017 09:02:12 +0000 (10:02 +0100)]
re PR c++/79681 (ICE with constexpr and bitfield)

PR c++/79681
* fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
attempt to use its first operand as BIT_FIELD_REF base.

* g++.dg/cpp1y/constexpr-79681-1.C: New test.
* g++.dg/cpp1y/constexpr-79681-2.C: New test.

From-SVN: r245804

7 years agore PR tree-optimization/79721 (Scalar evolution introduces signed overflow)
Richard Biener [Wed, 1 Mar 2017 08:54:29 +0000 (08:54 +0000)]
re PR tree-optimization/79721 (Scalar evolution introduces signed overflow)

2017-03-01  Richard Biener  <rguenther@suse.de>

PR middle-end/79721
* tree-chrec.c (chrec_evaluate): Perform computation of Newtons
interpolating formula in wrapping arithmetic.
(chrec_apply): Convert chrec_evaluate return value to wanted type.

* gcc.dg/torture/pr79721.c: New testcase.

From-SVN: r245803

7 years agore PR c++/79746 (Confusing -Wunused-but-set-parameter warning with virtual inheritance)
Jakub Jelinek [Wed, 1 Mar 2017 08:35:55 +0000 (09:35 +0100)]
re PR c++/79746 (Confusing -Wunused-but-set-parameter warning with virtual inheritance)

PR c++/79746
* init.c (emit_mem_initializers): When not constructing vbases of
abstract classes, mark arguments as read for
-Wunused-but-set-parameter.

* g++.dg/warn/Wunused-parm-9.C: New test.

From-SVN: r245802

7 years agore PR tree-optimization/79734 (ICE: verify_gimple failed)
Jakub Jelinek [Wed, 1 Mar 2017 08:34:48 +0000 (09:34 +0100)]
re PR tree-optimization/79734 (ICE: verify_gimple failed)

PR tree-optimization/79734
* tree-vect-generic.c (expand_vector_condition): Optimize
AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
Handle VEC_COND_EXPR where comparison has different inner width from
type's inner width.

* g++.dg/opt/pr79734.C: New test.

From-SVN: r245801

7 years agoinvoke.texi (ARC Options): Copy-edit to fix punctuation, markup, and similar issues.
Sandra Loosemore [Wed, 1 Mar 2017 04:31:28 +0000 (23:31 -0500)]
invoke.texi (ARC Options): Copy-edit to fix punctuation, markup, and similar issues.

2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>

gcc/
* doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
markup, and similar issues.  Remove @opindex entries for things
that aren't options.  Add missing -mmpy-option entries.

From-SVN: r245800

7 years agoDaily bump.
GCC Administrator [Wed, 1 Mar 2017 00:16:17 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245799

7 years agoClass template argument deduction refinements
Jason Merrill [Tue, 28 Feb 2017 23:57:09 +0000 (18:57 -0500)]
Class template argument deduction refinements

* call.c (joust): Move deduction guide tiebreaker down.
* decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class
deduction with no initializer.
* pt.c (build_deduction_guide): Handle implicit default/copy ctor.
(do_class_deduction): Use that rather than special case.
(do_auto_deduction): Handle null initializer.

From-SVN: r245796

7 years agore PR tree-optimization/79737 (wrong code at -O2 and -O3 on x86_64-linux-gnu (in...
Jakub Jelinek [Tue, 28 Feb 2017 22:39:11 +0000 (23:39 +0100)]
re PR tree-optimization/79737 (wrong code at -O2 and -O3 on x86_64-linux-gnu (in both 32-bit and 64-bit modes))

PR tree-optimization/79737
* gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
instead of byte_size.  Formatting fix.
(shift_bytes_in_array_right): Formatting fix.

* gcc.c-torture/execute/pr79737-1.c: New test.
* gcc.c-torture/execute/pr79737-2.c: New test.

From-SVN: r245795

7 years agomksigtab.sh: skip signals defined as other signals
Ian Lance Taylor [Tue, 28 Feb 2017 22:30:57 +0000 (22:30 +0000)]
mksigtab.sh: skip signals defined as other signals

    Fixes Solaris build.

    Patch by Rainer Orth.

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

From-SVN: r245794

7 years agore PR target/79749 (Many sparc testcases FAIL at -O0 with -fomit-frame-pointer)
Eric Botcazou [Tue, 28 Feb 2017 22:15:54 +0000 (22:15 +0000)]
re PR target/79749 (Many sparc testcases FAIL at -O0 with -fomit-frame-pointer)

PR target/79749
* config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
condition on optimize for the leaf function test.

From-SVN: r245791

7 years agoDo not allow to run GIMPLE or RTL test-cases w/ LTO (PR lto/79625).
Martin Liska [Tue, 28 Feb 2017 22:04:32 +0000 (23:04 +0100)]
Do not allow to run GIMPLE or RTL test-cases w/ LTO (PR lto/79625).

2017-02-28  Martin Liska  <mliska@suse.cz>

PR lto/79625
* read-rtl-function.c (function_reader::handle_unknown_directive):
Bail out when one uses -flto.

From-SVN: r245790

7 years agoIntroduce =<number> for couple of options.
Martin Liska [Tue, 28 Feb 2017 22:02:58 +0000 (23:02 +0100)]
Introduce =<number> for couple of options.

2017-02-28  Martin Liska  <mliska@suse.cz>

* c.opt: Replace space with tabular for options of <number>
type.
2017-02-28  Martin Liska  <mliska@suse.cz>

* common.opt: Replace space with tabular for options of <number>
type.
* config/i386/i386.opt: Show <number> value for
-mlarge-data-threshold.
* opts.c (print_filtered_help): Do not display number in hexadecimal
format.

From-SVN: r245789

7 years agoAdd tabulars for options with enum values.
Martin Liska [Tue, 28 Feb 2017 22:02:15 +0000 (23:02 +0100)]
Add tabulars for options with enum values.

2017-02-28  Martin Liska  <mliska@suse.cz>

* common.opt: Fix --help=option -Q for options which are of
an enum type.
2017-02-28  Martin Liska  <mliska@suse.cz>

* c.opt: Fix --help=option -Q for options which are of
an enum type.

From-SVN: r245788

7 years agore PR fortran/79739 (ICE with some interesting code)
Paul Thomas [Tue, 28 Feb 2017 19:32:02 +0000 (19:32 +0000)]
re PR fortran/79739 (ICE with some interesting code)

2017-02-28  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/79739
* resolve.c (resolve_fl_procedure): Deal with the case where
'submodule_name' is NULL so that gfc_error does not ICE.
Reformat the error message to make it more consistent.

From-SVN: r245787

7 years agoi386.c (print_reg): Error out for values of 8-bit size in invalid integer register.
Uros Bizjak [Tue, 28 Feb 2017 18:03:16 +0000 (19:03 +0100)]
i386.c (print_reg): Error out for values of 8-bit size in invalid integer register.

* config/i386/i386.c (print_reg): Error out for values
of 8-bit size in invalid integer register.

testsuite/ChangeLog:

* gcc.target/i386/invsize-1.c: New test.

From-SVN: r245785

7 years agoPR tree-optimization/79691 - -Wformat-truncation suppressed by (and only by) -Og
Martin Sebor [Tue, 28 Feb 2017 16:59:16 +0000 (16:59 +0000)]
PR tree-optimization/79691 - -Wformat-truncation suppressed by (and only by) -Og

gcc/ChangeLog:

PR tree-optimization/79691
* passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.

gcc/testsuite/ChangeLog:

PR tree-optimization/79691
* gcc.dg/tree-ssa/pr79691.c: New test.

From-SVN: r245782

7 years agore PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231)
Jakub Jelinek [Tue, 28 Feb 2017 16:24:56 +0000 (17:24 +0100)]
re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231)

PR target/79729
* config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
gcc_unreachable with output_operand_lossage.

* gcc.target/i386/pr79729.c: New test.

From-SVN: r245781

7 years agore PR tree-optimization/79740 (ICE on -Os and above in both 32-bit and 64-bit modes...
Richard Biener [Tue, 28 Feb 2017 15:32:24 +0000 (15:32 +0000)]
re PR tree-optimization/79740 (ICE on -Os and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407  }))

2017-02-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79740
* tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
inserts.
(visit_nary_op): Insert the nary into the hashtable if we
pattern-matched sth.
* tree-ssa-pre.c (eliminate_insert): Robustify.

* gcc.dg/torture/pr79740.c: New testcase.

From-SVN: r245780

7 years agore PR c/79731 (ICE: verify_gimple failed)
Richard Biener [Tue, 28 Feb 2017 15:31:30 +0000 (15:31 +0000)]
re PR c/79731 (ICE: verify_gimple failed)

2017-02-28  Richard Biener  <rguenther@suse.de>

PR middle-end/79731
* fold-const.c (decode_field_reference): Reject out-of-bound
accesses.

* c-c++-common/torture/pr79731.c: New testcase.

From-SVN: r245779

7 years agoi386.c: Include intl.h.
Jakub Jelinek [Tue, 28 Feb 2017 15:25:19 +0000 (16:25 +0100)]
i386.c: Include intl.h.

* config/i386/i386.c: Include intl.h.
(ix86_option_override_internal): Use cond ? G_("...") : G_("...")
instead of just cond ? "..." : "...".
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
* coverage.c (read_counts_file): Likewise.
* omp-offload.c: Include intl.h.
(oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
of just cond ? "..." : "...".
* gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
of just cond ? "..." : "...".
c/
* c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
instead of just cond ? "..." : "...".
(c_parser_oacc_enter_exit_data): Use %s and ternary operator only
for "enter"/"exit" keyword.
(c_finish_oacc_routine): Don't use %s to supply portions of the
message.
cp/
* decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...")
instead of just cond ? "..." : "...".
(grokdeclarator): Likewise.
(build_enumerator): Likewise.
* init.c (build_new_1): Likewise.
* call.c (build_new_method_call_1): Likewise.
* parser.c: Include intl.h.
(cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for
"enter"/"exit" keyword.
(cp_finalize_oacc_routine): Don't use %s to supply portions of the
message.
fortran/
* parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
instead of just cond ? "..." : "...".
* scanner.c (gfc_next_char_literal): Likewise.
* match.c (match_exit_cycle): Likewise.

From-SVN: r245778

7 years agoruntime: fix sigfwd to not allocate memory
Ian Lance Taylor [Tue, 28 Feb 2017 15:13:16 +0000 (15:13 +0000)]
runtime: fix sigfwd to not allocate memory

    The use of &[1]uintptr{fn} was causing sigfwd to allocate memory, even
    though it is being compiled for the runtime package.  That is a bad
    idea for this function, which is invoked by a signal handler.  Rewrite
    it to use only constructs that do not allocate memory when compiled
    for the runtime package.

    The test for this is misc/cgo/testcarchive in the main repo, which we
    don't yet test.

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

From-SVN: r245777

7 years agolibgo: fix quoting in mksigtab.sh
Ian Lance Taylor [Tue, 28 Feb 2017 15:09:43 +0000 (15:09 +0000)]
libgo: fix quoting in mksigtab.sh

    The quoting was causing us to never add the system-specific signals.

    The test for this is misc/cgo/testcarchive in the master repo, which
    we don't yet run for gccgo.

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

From-SVN: r245776

7 years ago[ARM] Fix PR79742 incorrect scheduler choice.
Richard Earnshaw [Tue, 28 Feb 2017 14:17:29 +0000 (14:17 +0000)]
[ARM] Fix PR79742 incorrect scheduler choice.

Due to an oversight, the changes to use the new CPU generation tables
forgot to handle selecting a scheduler for a CPU other than the named
CPU target.  This meant that if, say, cortex-a12 was used, the null
scheduler was chosen rather than cortex-a17's scheduler as intended.
The fix is to correctly use the 'tune for' field when generating the
target-specific data files.

This revealed a spelling mistake in the name of the tune target in
cortex-m0.small-multiply.

PR target/79742
* config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
entry, if present.
* config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
'tune for' CPU name.
* config/arm/arm-cpu-data.h: Regenerated.

From-SVN: r245775

7 years agoupdate_web_docs_svn: Remove a reference to GCC 3.1.
Gerald Pfeifer [Tue, 28 Feb 2017 13:17:52 +0000 (13:17 +0000)]
update_web_docs_svn: Remove a reference to GCC 3.1.

* update_web_docs_svn: Remove a reference to GCC 3.1.  Describe
settings to tweak if running on a host different from gcc.gnu.org.
(WWWBASE): Allow override via the environment.  Also check for
existance.

From-SVN: r245774

7 years agore PR middle-end/79732 (ICE in set_ssa_default_def, at tree-dfa.c:327)
Richard Biener [Tue, 28 Feb 2017 12:38:57 +0000 (12:38 +0000)]
re PR middle-end/79732 (ICE in set_ssa_default_def, at tree-dfa.c:327)

2017-02-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79732
* tree-inline.c (expand_call_inline): Do not shadow var.

* gcc.dg/torture/pr79732.c: New testcase.

From-SVN: r245773

7 years agore PR tree-optimization/79723 (Another case of dropped gs: prefix)
Richard Biener [Tue, 28 Feb 2017 09:17:20 +0000 (09:17 +0000)]
re PR tree-optimization/79723 (Another case of dropped gs: prefix)

2017-02-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79723
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
address-space properly.

* gcc.target/i386/pr79723.c: New testcase.

From-SVN: r245772

7 years agoMiscellaneous optimization group fixes
Thomas Schwinge [Tue, 28 Feb 2017 08:42:06 +0000 (09:42 +0100)]
Miscellaneous optimization group fixes

gcc/
* doc/optinfo.texi (Optimization groups): Fix option used for
OPTGROUP_ALL.
* doc/invoke.texi (-fopt-info): Document "omp".
* dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
(OPTGROUP_ALL): Add OPTGROUP_OMP.
* hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
* ipa-hsa.c (pass_data_ipa_hsa): Likewise.
* omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.

From-SVN: r245769