]> gcc.gnu.org Git - gcc.git/log
gcc.git
7 years agotree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump to ...
Bin Cheng [Thu, 11 May 2017 09:54:30 +0000 (09:54 +0000)]
tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump to ...

* tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
to ...
(determine_group_iv_costs): ... here.
(find_inv_vars_cb): Record inv var if it's not recorded before.

From-SVN: r247896

7 years agotree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
Bin Cheng [Thu, 11 May 2017 09:52:52 +0000 (09:52 +0000)]
tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.

* tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
(get_shiftadd_cost): Ditto.

From-SVN: r247895

7 years agotree-ssa-address.c: Include header file.
Bin Cheng [Thu, 11 May 2017 09:51:41 +0000 (09:51 +0000)]
tree-ssa-address.c: Include header file.

* tree-ssa-address.c: Include header file.
(move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
address.
(add_to_parts): Refactor.
(addr_to_parts): New parameter.  Update use of move_hint_to_base.
(create_mem_ref): Update use of addr_to_parts.  Re-associate addr
in new order.

From-SVN: r247894

7 years agore PR tree-optimization/53090 (suboptimal ivopt)
Bin Cheng [Thu, 11 May 2017 09:50:15 +0000 (09:50 +0000)]
re PR tree-optimization/53090 (suboptimal ivopt)

PR tree-optimization/53090
* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
COMP_IV_EXPR_2.
(extract_cond_operands): Detect condition with IV on both sides
and return COMP_IV_EXPR_2.
(find_interesting_uses_cond): Add iv_use for both IVs in condition.
(rewrite_use_compare): Simplify by removing call to function
extract_cond_operands.

From-SVN: r247893

7 years agotree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
Bin Cheng [Thu, 11 May 2017 09:48:55 +0000 (09:48 +0000)]
tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.

* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
(extract_cond_operands): Detect condition comparing against non-
invariant bound and return appropriate enum value.
(find_interesting_uses_cond): Update use of extract_cond_operands.
Handle its return value accordingly.
(determine_group_iv_cost_cond, rewrite_use_compare): Ditto.

From-SVN: r247892

7 years agotree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate nonlinear iv_use...
Bin Cheng [Thu, 11 May 2017 09:47:24 +0000 (09:47 +0000)]
tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate nonlinear iv_use computation in loop invariant sensitive way.

* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
nonlinear iv_use computation in loop invariant sensitive way.

From-SVN: r247891

7 years agotree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
Bin Cheng [Thu, 11 May 2017 09:42:36 +0000 (09:42 +0000)]
tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.

* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
(find_iv_candidates): Call relate_compare_use_with_all_cands.

From-SVN: r247890

7 years agotree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
Bin Cheng [Thu, 11 May 2017 09:40:48 +0000 (09:40 +0000)]
tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.

* tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
(dump_cand): Support iv_cand.inv_exprs.
(add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
for candidates.
(iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
iv_cand.inv_exprs.

From-SVN: r247889

7 years agotree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move from ...
Bin Cheng [Thu, 11 May 2017 09:38:22 +0000 (09:38 +0000)]
tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move from ...

* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
from ...
* tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
as local function.  Include necessary header files.
* tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.

From-SVN: r247888

7 years ago* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
Bin Cheng [Thu, 11 May 2017 09:36:05 +0000 (09:36 +0000)]
* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.

From-SVN: r247887

7 years agotree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more operators...
Bin Cheng [Thu, 11 May 2017 09:33:49 +0000 (09:33 +0000)]
tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more operators...

* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
RSHIFT_EXPR and BIT_NOT_EXPR.

From-SVN: r247886

7 years agotree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
Bin Cheng [Thu, 11 May 2017 09:31:18 +0000 (09:31 +0000)]
tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.

* tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
(adjust_setup_cost): New parameter supporting round up adjustment.
(struct address_cost_data): Delete.
(force_expr_to_var_cost): Don't bound cost with spill_cost.
(split_address_cost, ptr_difference_cost): Delete.
(difference_cost, compare_aff_trees, record_inv_expr): Delete.
(struct ainc_cost_data): New struct.
(get_address_cost_ainc): New function.
(get_address_cost, get_computation_cost): Reimplement.
(determine_group_iv_cost_address): Record inv_expr for all uses of
a group.
(determine_group_iv_cost_cond): Call get_loop_invariant_expr.
(iv_ca_has_deps): Reimplemented to ...
(iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
than OLD_CP.
(iv_ca_extend): Call iv_ca_more_deps.

From-SVN: r247885

7 years agotree-ssa-address.c (struct mem_address): Move to header file.
Bin Cheng [Thu, 11 May 2017 09:27:55 +0000 (09:27 +0000)]
tree-ssa-address.c (struct mem_address): Move to header file.

* tree-ssa-address.c (struct mem_address): Move to header file.
(valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
* tree-ssa-address.h (struct mem_address): Move from C file.
(valid_mem_ref_p, move_fixed_address_to_symbol): Declare.

From-SVN: r247884

7 years agotree-affine.h (aff_combination_type): New interface.
Bin Cheng [Thu, 11 May 2017 09:25:30 +0000 (09:25 +0000)]
tree-affine.h (aff_combination_type): New interface.

* tree-affine.h (aff_combination_type): New interface.
(aff_combination_zero_p): Remove static.
(aff_combination_const_p): New interface.
(aff_combination_singleton_var_p): New interfaces.

From-SVN: r247883

7 years agotree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Skip unreachable blocks...
Richard Biener [Thu, 11 May 2017 09:16:00 +0000 (09:16 +0000)]
tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Skip unreachable blocks and destinations.

2017-05-11  Richard Biener  <rguenther@suse.de>

* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Skip unreachable blocks and destinations.
(eliminate): Move stmt removal and fixup ...
(fini_eliminate): ... here.  Skip inserted exprs.
(pass_pre::execute): Move fini_pre after fini_eliminate.
* tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
(tail_merge_optimize): Run cleanup_tree_cfg if requested by
PRE to get rid of dead code that has invalid SSA form and
split critical edges again.

From-SVN: r247882

7 years ago* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
Bin Cheng [Thu, 11 May 2017 09:10:01 +0000 (09:10 +0000)]
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.

From-SVN: r247881

7 years agore PR c++/80682 (__is_trivially_constructible(void, int) returns true.)
Ville Voutilainen [Thu, 11 May 2017 07:44:29 +0000 (10:44 +0300)]
re PR c++/80682 (__is_trivially_constructible(void, int) returns true.)

PR c++/80682

cp/

PR c++/80682
* method.c (is_trivially_xible): Reject void types.

testsuite/

PR c++/80682
* g++.dg/ext/is_trivially_constructible1.C: Add tests for void target.

From-SVN: r247880

7 years agopasses.c (execute_function_todo): Verify loops if they are said to be up-to-date.
Richard Biener [Thu, 11 May 2017 07:26:32 +0000 (07:26 +0000)]
passes.c (execute_function_todo): Verify loops if they are said to be up-to-date.

2017-05-11  Richard Biener  <rguenther@suse.de>

* passes.c (execute_function_todo): Verify loops if they are
said to be up-to-date.
* cfgexpand.c (pass_expand::execute): Discard loops for -dx.
* trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.

From-SVN: r247879

7 years agoDaily bump.
GCC Administrator [Thu, 11 May 2017 00:16:37 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247878

7 years agore PR target/80090 (Incorrect assembler - output_addr_const may generate visibility...
John David Anglin [Wed, 10 May 2017 23:54:58 +0000 (23:54 +0000)]
re PR target/80090 (Incorrect assembler - output_addr_const may generate visibility output between op and address constant)

PR target/80090
* config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
handle calling assemble_external ourself.

From-SVN: r247872

7 years agore PR target/79027 (fold-const.c:11104:1: internal compiler error: Floating point...
John David Anglin [Wed, 10 May 2017 22:54:07 +0000 (22:54 +0000)]
re PR target/79027 (fold-const.c:11104:1: internal compiler error: Floating point exception)

PR target/79027
* config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
modes with zero size.  Enhance comment.

From-SVN: r247869

7 years agoclass.c (handle_using_decl): Always use OVL_CURRENT.
Nathan Sidwell [Wed, 10 May 2017 20:53:32 +0000 (20:53 +0000)]
class.c (handle_using_decl): Always use OVL_CURRENT.

* class.c (handle_using_decl): Always use OVL_CURRENT.
(resolve_address_of_overloaded_function): Move iterator decl into
for scope.  Don't strip anticipated decls here.

From-SVN: r247864

7 years agopt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD printing.
Nathan Sidwell [Wed, 10 May 2017 20:47:16 +0000 (20:47 +0000)]
pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD printing.

* pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD
printing.
(print_candidates): Adjust.

From-SVN: r247863

7 years agocp-tree.h (build_new_function_call): Lose koenig_p arg.
Nathan Sidwell [Wed, 10 May 2017 20:43:09 +0000 (20:43 +0000)]
cp-tree.h (build_new_function_call): Lose koenig_p arg.

* cp-tree.h (build_new_function_call): Lose koenig_p arg.  Fix
line breaking.
* call.c (build_new_function_call): Lose koenig_p arg.  Remove
koenig_p handling here.
* pt.c (push_template_decl_real): Unconditionally
retrofit_lang_decl.
(tsubst_omp_clauses): Likewise.
(do_class_deduction): Adjust buld_new_function_call calls.
* semantics.c (finish_call_expr): Likewise.

From-SVN: r247860

7 years agoBump version namespace.
François Dumont [Wed, 10 May 2017 20:40:28 +0000 (20:40 +0000)]
Bump version namespace.

2017-05-10  François Dumont  <fdumont@gcc.gnu.org>

Bump version namespace.
* config/abi/pre/gnu-versioned-namespace.ver: Bump version namespace
from __7 to __8. Bump GLIBCXX_7.0 to GLIBCXX_8.0.
* acinclude.m4 (libtool_VERSION): Bump to 8:0:0.
* include/bits/c++config: Adapt.
* include/bits/regex.h: Adapt.
* include/experimental/bits/fs_fwd.h: Adapt.
* include/experimental/bits/lfts_config.h: Adapt.
* include/std/variant: Adapt.
* python/libstdcxx/v6/printers.py: Adapt.
* testsuite/libstdc++-prettyprinters/48362.cc: Adapt.
* include/bits/stl_tree.h (_Rb_tree_impl<>): Remove _Is_pod_comparator
template parameter when version namespace is active.

From-SVN: r247858

7 years agoHave other unify failure functions call unify_invalid.
Jason Merrill [Wed, 10 May 2017 20:20:18 +0000 (16:20 -0400)]
Have other unify failure functions call unify_invalid.

* pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch)
(unify_type_mismatch, unify_parameter_pack_mismatch)
(unify_ptrmem_cst_mismatch, unify_expression_unequal)
(unify_parameter_pack_inconsistent, unify_inconsistency)
(unify_vla_arg, unify_method_type_error, unify_arity)
(unify_arg_conversion, unify_no_common_base)
(unify_inconsistent_template_template_parameters)
(unify_template_deduction_failure)
(unify_template_argument_mismatch)
(unify_overload_resolution_failure): Call unify_invalid.

From-SVN: r247857

7 years agoCWG 1847 - Clarifying compatibility during partial ordering
Jason Merrill [Wed, 10 May 2017 20:07:22 +0000 (16:07 -0400)]
CWG 1847 - Clarifying compatibility during partial ordering

* pt.c (more_specialized_fn): No order between two non-deducible
parameters.

From-SVN: r247856

7 years agostl_algobase.h (std::__iter_swap<false>): Remove _GLIBCXX_MOVE usage.
François Dumont [Wed, 10 May 2017 20:05:26 +0000 (20:05 +0000)]
stl_algobase.h (std::__iter_swap<false>): Remove _GLIBCXX_MOVE usage.

2017-05-10  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_algobase.h (std::__iter_swap<false>): Remove
_GLIBCXX_MOVE usage.

From-SVN: r247855

7 years agors6000.c (altivec_init_builtins): Define POWER8 built-ins for vec_xl and vec_xst...
Bill Schmidt [Wed, 10 May 2017 19:40:17 +0000 (19:40 +0000)]
rs6000.c (altivec_init_builtins): Define POWER8 built-ins for vec_xl and vec_xst with short and char pointer...

[gcc]

2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
built-ins for vec_xl and vec_xst with short and char pointer
arguments.

[gcc/testsuite]

2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/p8-vec-xl-xst.c: New file.

From-SVN: r247854

7 years ago* config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
Uros Bizjak [Wed, 10 May 2017 18:04:44 +0000 (20:04 +0200)]
* config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
(_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
(_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
(_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
(_mm_maskz_min_round_ss): New intrinsics.
* config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
(V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
* config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
(__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
(__builtin_ia32_minss_mask_round): New builtins.
* config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
* config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
Rename to ...
(<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
(v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
Change to ...
(v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
... this.

* config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
(_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
(_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
(_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
(_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
(_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
(_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
* config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
* config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
(__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
(__builtin_ia32_mulss_mask_round): New builtins.
* config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
* config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
Rename to ...
(<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
(v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
Change to ...
(v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
... this.

* config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
(_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
(_mm256_setr_m128i): New intrinsics.

* config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
(_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
(_mm_maskz_rcp14_ss): New intrinsics.
* config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
(__builtin_ia32_rcp14ss_mask): New builtins.
* config/i386/sse.md (srcp14<mode>_mask): New pattern.

testsuite/ChangeLog:

* gcc.target/i386/avx512f-vmaxsd-1.c (_mm_mask_max_round_sd)
(_mm_maskz_max_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vmaxsd-2.c: New.
* gcc.target/i386/avx512f-vmaxss-1.c (_mm_mask_max_round_ss)
(_mm_maskz_max_round_ss): Test new intrinsics.
* gcc.target/i386/avx512f-vmaxss-2.c: New.
* gcc.target/i386/avx512f-vminsd-1.c (_mm_mask_min_round_sd)
(_mm_maskz_min_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vminsd-2.c: New.
* gcc.target/i386/avx512f-vminss-1.c (_mm_mask_min_round_ss)
(_mm_maskz_min_round_ss): Test new intrinsics.
* gcc.target/i386/avx512f-vminss-2.c: New.
* gcc.target/i386/avx-1.c (__builtin_ia32_maxsd_mask_round)
(__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
(__builtin_ia32_minss_mask_round): Test new builtins.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.
* gcc.target/i386/sse-14.c (_mm_maskz_max_round_sd)
(_mm_maskz_max_round_ss, _mm_maskz_min_round_sd)
(_mm_maskz_min_round_ss, _mm_mask_max_round_sd)
(_mm_mask_max_round_ss, _mm_mask_min_round_sd)
(_mm_mask_min_round_ss): Test new intrinsics.
* gcc.target/i386/testround-1.c: Ditto.

* gcc.target/i386/avx512f-vdivsd-1.c (_mm_mask_div_sd)
(_mm_maskz_div_sd, _mm_mask_div_round_sd)
(_mm_maskz_div_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vdivsd-2.c: New.
* gcc.target/i386/avx512f-vdivss-1.c (_mm_mask_div_ss)
(_mm_maskz_div_ss, _mm_mask_div_round_ss)
(_mm_maskz_div_round_ss): Test new intrinsics.
* gcc.target/i386/avx512f-vdivss-2.c: New.
* gcc.target/i386/avx512f-vmulsd-1.c (_mm_mask_mul_sd)
(_mm_maskz_mul_sd, _mm_mask_mul_round_sd)
(_mm_maskz_mul_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vmulsd-2.c: New.
* gcc.target/i386/avx512f-vmulss-1.c (_mm_mask_mul_ss)
(_mm_maskz_mul_ss, _mm_mask_mul_round_ss)
(_mm_maskz_mul_round_ss): Test new intrinsics.
* gcc.target/i386/avx512f-vmulss-2.c: New.
* gcc.target/i386/avx-1.c (__builtin_ia32_divsd_mask_round)
(__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
(__builtin_ia32_mulss_mask_round): Test new builtins.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.
* gcc.target/i386/sse-14.c (_mm_maskz_div_round_sd)
(_mm_maskz_div_round_ss, _mm_maskz_mul_round_sd)
(_mm_maskz_mul_round_ss): Test new intrinsics.
* gcc.target/i386/testround-1.c: Ditto.

* gcc.target/i386/avx-vinsertf128-256-1: Test new intrinsics.
* gcc.target/i386/avx-vinsertf128-256-2: Ditto.
* gcc.target/i386/avx-vinsertf128-256-3: Ditto.

* gcc.target/i386/avx512f-vrcp14sd-1.c: Test new intrinsics.
* gcc.target/i386/avx512f-vrcp14sd-2.c: Ditto.
* gcc.target/i386/avx512f-vrcp14ss-1.c: Ditto.
* gcc.target/i386/avx512f-vrcp14ss-2.c: Ditto.

From-SVN: r247851

7 years agoAda/x32: PR ada/80626: Correct Memory_Size
H.J. Lu [Wed, 10 May 2017 17:35:02 +0000 (17:35 +0000)]
Ada/x32: PR ada/80626: Correct Memory_Size

X32 uses 64 as word size instead of 32.  This must not affect the
Address type definition which is based on Memory_Size.

PR ada/80626
* system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
instead of Word_Size.

From-SVN: r247849

7 years agoBig merge of changes to gofrontend repo that were postponed due to the
Ian Lance Taylor [Wed, 10 May 2017 17:26:09 +0000 (17:26 +0000)]
Big merge of changes to gofrontend repo that were postponed due to the
GCC release freeze.

* go-backend.c: Include "go-c.h".
* go-gcc.cc (Gcc_backend::write_export_data): New method.

* go-gcc.cc (Gcc_backend::Gcc_backend): Declare
__builtin_prefetch.
* Make-lang.in (GO_OBJS): Add go/wb.o.

commit 884c9f2cafb3fc1decaca70f1817ae269e4c6889
Author: Than McIntosh <thanm@google.com>
Date:   Mon Jan 23 15:07:07 2017 -0500

    compiler: insert additional conversion for type desc ptr expr

    Change the method Type::type_descriptor_pointer to apply an additional
    type conversion to its result Bexpression, to avoid type clashes in
    the back end. The backend expression for a given type descriptor var
    is given a type of "_type", however the virtual calls that create the
    variable use types derived from _type, hence the need to force a
    conversion.

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

commit 5f0647c71e3b29eddcd0eecc44e7ba44ae7fc8dd
Author: Than McIntosh <thanm@google.com>
Date:   Mon Jan 23 15:22:26 2017 -0500

    compiler: insure tree integrity in Call_expression::set_result

    Depending on the back end, it can be problematic to reuse Bexpressions
    (passing the same Bexpression to more than one Backend call to create
    additional Bexpressions or Bstatements). The Call_expression::set_result
    method was reusing its Bexpression input in more than one tree
    context; the fix is to pass in an Expression instead and generate
    multiple Bexpression references to it within the method.

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

commit 7a8e49870885af898c3c790275e513d1764a2828
Author: Ian Lance Taylor <iant@golang.org>
Date:   Tue Jan 24 21:19:06 2017 -0800

    runtime: copy more of the scheduler from the Go 1.8 runtime

    Copies mstart, newm, m0, g0, and friends.

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

commit 3546e2f002d0277d805ec59c5403bc1d4eda4ed9
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Jan 26 19:47:37 2017 -0800

    runtime: remove a few C functions that are no longer used

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

commit a71b835254f6d3164a0e6beaf54f2b175d1a6a92
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Jan 26 16:51:16 2017 -0800

    runtime: copy over more of the Go 1.8 scheduler

    In particular __go_go (aka newproc) and goexit[01].

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

commit c3ffff725adbe54d8283c373b6aa7dc95d6fc27f
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Jan 27 16:58:20 2017 -0800

    runtime: copy syscall handling from Go 1.8 runtime

    Entering a syscall still has to start in C, to save the registers.
    Fix entersyscallblock to save them more reliably.

    This copies over the tracing code for syscalls, which we previously
    weren't doing, and lets us turn on runtime/trace/check.

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

commit d5b921de4a28b04000fc4c8dac7f529a4a624dfc
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Jan 27 18:34:11 2017 -0800

    runtime: copy SIGPROF handling from Go 1.8 runtime

    Also copy over Breakpoint.

    Fix Func.Name and Func.Entry to not crash on a nil Func.

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

commit cc60235e55aef14b15c3d2114030245beb3adfef
Author: Than McIntosh <thanm@google.com>
Date:   Mon Feb 6 11:12:12 2017 -0500

    compiler: convert go_write_export_data to Backend method.

    Convert the helper function 'go_write_export_data' into a Backend
    class method, to allow for an implementation of this function that
    needs to access backend state.

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

commit e387439bfd24d5e142874b8e68e7039f74c744d7
Author: Than McIntosh <thanm@google.com>
Date:   Wed Feb 8 11:13:46 2017 -0500

    compiler: insert backend conversion in temporary statement init

    Insert an additional type conversion in Temporary_statement::do_get_backend
    when assigning a Bexpression initializer to the temporary variable, to
    avoid potential clashes in the back end. This can come up when assigning
    something of concrete pointer-to-function type to a variable of generic
    pointer-to-function type.

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

commit c5acf0ce09e61ff623847a35a99da465b8571609
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 1 17:57:53 2017 +0100

    libgo: build tags for aix

    Build tags for the libgo source files required to build
    libgo on AIX.

    Issue golang/go#19200

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

commit 67ed19616898ea18a101ec9325b82d028cd395d9
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 2 15:41:31 2017 +0100

    libgo: handle AIX tag in match.sh and gotest

    Issue golang/go#19200

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

commit 83ea2d694c10b2dd83fc8620c43da13d20db754e
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 1 17:48:16 2017 +0100

    libgo: add AIX support in configure and Makefile

    - support for GOOS=aix
    - CFLAGS/GOCFLAGS/LDFLAGS for AIX

    Issue golang/go#19200

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

commit 35d577fe22ffa16a3ccaadf5dae9f6f425c8ec8c
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Mon Mar 6 15:00:15 2017 +0100

    runtime: adapt memory management to AIX mmap

    On AIX:
    * mmap does not allow to map an already mapped range,
    * mmap range start at 0x30000000 for 32 bits processes,
    * mmap range start at 0x70000000_00000000 for 64 bits processes

    Issue golang/go#19200

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

commit 4e49e56a5fd4072b4ca7fcefe4158d6885d9ee62
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Mon Mar 6 13:42:26 2017 +0100

    runtime: add getproccount implementation for AIX

    Issue golang/go#19200

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

commit ff626470294237ac664127894826614edc46a3d0
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Mon Mar 6 17:31:21 2017 +0100

    runtime: handle ERESTART errno with AIX's wait4

    On AIX, wait4 may return with errno set to ERESTART, which causes unexepected
    behavior (for instance, go build may exit with the message "wait: restart
    system call" after running a command, even if it was successfull).

    Issue golang/go#19200

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

commit 37daabbfc83d533b826ef9ab10e2dee7406e7198
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Mon Mar 6 11:02:58 2017 +0100

    runtime: support for AIX's procfs tree

    On AIX, the process executable file is available under /proc/<pid>/object/a.out

    Issue golang/go#19200

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

commit a0275c039d56acf4bf48151978c1a4ec5758cc2c
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Mar 8 07:00:05 2017 -0800

    libgo/Makefile.am: don't use nonportable \n or \t in sed expression

    The resulting zstdpktlist.go is less pretty, but it works.

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

commit 29b190f76105aafa2b50b48249afdafecc97a4be
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 9 16:02:34 2017 +0100

    runtime: netpoll and semaphores for AIX

    semaphore implementation based on Solaris implementation in
    libgo/go/runtime/os_solaris.go

    netpoll is just a stub to avoid build failure on AIX.

    Issue golang/go#19200

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

commit 55ca6d3f3cddf0ff9ccb074b2694da9fc54de7ec
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 9 15:38:30 2017 +0100

    libmain: ensure initfn is called when loading a go library

    AIX does not support .init_array.
    The alterative is to export the __go_init function and tell the linker
    it is an init function with the -Wl,-binitfini:__go_init option.

    Issue golang/go#19200

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

commit 349a30d17d880ac8bc1a35e1a2ffee6d6e870ae9
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Mar 10 11:15:08 2017 +0100

    libgo: use an import list for missing symbols

    libgo depends on symbols provided by Go programs at runtime. On AIX,
    this requires either to build libgo with -Wl,-berok linker option and
    the programs with -Wl,-brtl, or to provide a list of imported symbols
    when building libgo. The second options seems preferable, to avoid
    requiring an additional option for every Go program.

    There are also some symbols that are specific to GNU ld and do not
    exist when linking with AIX ld (__data_start, __edata, __etext and
    __bss_start).

    Issue golang/go#19200

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

commit 91db0ea1ff068ca1d97b9c99612100ea5b96ddb2
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 8 15:34:45 2017 +0100

    crypto/x509: add certificate files locations for AIX

    Issue golang/go#19200

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

commit 92e521c854e91709b949548c47e267377850f26a
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Mar 10 14:10:11 2017 -0800

    compiler: fix check for pointer in Temporary_reference_expression

    The check for an unrepresentable pointer in
    Temporary_reference_expression::do_get_backend was incorrectly
    translated from C to Go in https://golang.org/cl/14346043.  Fix the
    check to use points_to rather than has_pointer and deref.  This should
    not make any difference in practice as either way the condition will
    only be true for a pointer to void, but points_to is correct and more
    efficient.

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

commit 9a0b676e59e7171a630c48fdc3d4de6712bad0ca
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 16 16:51:53 2017 +0100

    libgo: add missing _arpcom struct to *sysinfo.go

    This struct is filtered due to having a field of type _in6_addr,
    but other types exported to *sysinfo.go are depending on it.

    Issue golang/go#19200

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

commit 61262a757bdd3d9a595ab6a90f68c0c4ebed7bc1
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 16 18:27:46 2017 +0100

    syscall: raw_ptrace stub for AIX

    Issue golang/go#19200

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

commit 8029632b50880fd9b5e39299c738b38e3386595f
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 15 16:58:37 2017 +0100

    libgo: adapt runtime.inc to AIX

    * Two AIX types are wrongfully exported to runtime.inc as their names
      make them look like a Go type.
    * The sigset go type conflicts with a system sigset type.

    Issue golang/go#19200

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

commit 25f3a90d14bc268479369ecc0eada72791612f86
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 15 16:58:37 2017 +0100

    libgo: update Makefile.in, accidentally omitted from last change

    Issue golang/go#19200

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

commit d52b4895616b66f93b460366527e74336829aaa5
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 16 18:39:26 2017 +0100

    syscall: TIOCSCTTY does not exist on AIX

    Issue golang/go#19200

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

commit ff1ec3847a4472008e5d53a98b6694b1e54ca322
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 16 18:07:34 2017 +0100

    syscall: syscall does not exist on AIX

    Issue golang/go#19200

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

commit c1ee60dabf0b243a0b0286215481a5d326c34596
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Mar 17 17:18:18 2017 +0100

    net: EAI_OVERFLOW does not exist on AIX

    Issue golang/go#19200

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

commit ad4ad29aed9f70b14b39b488bfeb9ee745382ec4
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Mar 17 17:23:56 2017 +0100

    net: sockopt/sockoptip stubs for AIX

    Issue golang/go#19200

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

commit 5d7db2d7542fe7082f426d42f8c2ce14aad6df55
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Mar 17 16:35:05 2017 +0100

    os/user: add listgroups stub for AIX

    This is required to build os/user.

    Issue golang/go#19200

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

commit 4e57a7973e9fa4cb5ab977c6d792e62a8f7c5795
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 22 11:11:30 2017 +0100

    os: fix readdirnames for AIX

    Largefile implementation should be used on AIX.

    readdir64_r function returns 9 and sets result to NULL when
    reaching end of directory, so this return code should not
    always be considered as an error.

    Issue golang/go#19200

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

commit b34036967d1ec57b25e3debe077439b4210a1d4a
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Mar 17 17:39:31 2017 +0100

    libgo: adapt sigtab.go to AIX

    On AIX, _NSIG is not directly defined to its integer value in
    gen-sysinfo.go.
    The real value is _SIGMAX32+1 or _SIGMAX64+1, depending if we are
    building a 32bit ligbo or a 64bit libgo, so we need to read one of
    those constants to set nsig value in mksigtab.sh

    This change also ensures that all signal numbers from 0 to nsig-1
    are referenced in sigtable.

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

commit 20991c32671a183ec859b4f285df37fdd4634247
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 23 17:28:09 2017 +0100

    syscall: missing import in socket_bsd.go

    Issue golang/go#19200

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

commit c34754bd9adf5496c4c26257eaa50793553c11e8
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 22 17:57:01 2017 +0100

    sycall: WCOREDUMP macro is not defined on AIX

    Issue golang/go#19200

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

commit 4f38813482227b12ea0ac6ac1b981ff9ef9853ef
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 23 17:44:43 2017 +0100

    libgo: additional build tags for AIX

    Issue golang/go#19200

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

commit d117ede6ff5a7083e9c40eba28a0f94f3535d773
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 23 17:48:46 2017 +0100

    go/build: add AIX to "go build" command known OS

    Issue golang/go#19200

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

commit 7b0ddaa6a6a71f9eb1c374122d29775b13c2cac5
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Mar 23 09:57:01 2017 -0700

    compiler: don't crash if imported package imports this one

    When building a test it's OK if test code imports a package that
    imports this one. The go tool is supposed to catch cases where this
    creates an impossible initialization order. The compiler already has
    code to permit this in Gogo::add_import_init_fn. This CL avoids a
    compiler crash on a similar case when writing out the export data.

    I have no test case for this. Basically it pushes a compiler crash
    into an error reported elsewhere.

    Problem was reported by Tony Reix.

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

commit 925636975d075e3e3353823b09db3f933f23cb03
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Mar 29 14:14:18 2017 -0700

    runtime: copy finalizer support from Go 1.8 runtime

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

commit 1ccb22b96cb3b1011db0e427877d9ddecb577fa9
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Mar 30 15:21:06 2017 +0200

    runtime: initcontext and setcontext stubs for AIX

    Further investigations are required to understand the clobbering
    issue and implement a proper fix. Until then, those stubs are
    required to allow the build to complete.

    Issue golang/go#19200

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

commit 27db481f369b54256063c72b911d22390c59199c
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 29 18:07:25 2017 +0200

    os: fix Readlink failure on AIX

    AIX readlink routine returns an error if the link is longer
    than the buffer, instead of truncating the link.

    Issue golang/go#19200

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

commit c93babbf48eddd0bc34d4179ffb302dc60087299
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 29 17:26:35 2017 +0200

    compiler: implement support for reading AIX big archives

    This is required to read go export from a Go library.

    Code courtesy of Damien Bergamini from Atos Infogérance.

    Issue golang/go#19200
    Reviewed-on: https://go-review.googlesource.com/38698

commit 930dd53482bdee3a9074850d168d0b9d7819c135
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 6 18:50:11 2017 -0700

    compiler: fix whether conversions are static initializers

    The compiler was incorrectly treating type conversions from string to
    int or vice-versa as static initializers.  That doesn't work, as those
    conversions are implemented via a function call.

    This case may never actually arise but it seems like the right thing to do.

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

commit f02691e4195728dbf06f4dde0853c6bccc922183
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 6 17:24:08 2017 -0700

    compiler, runtime: don't let slices point past end of memory block

    When Go code uses a slice expression like [:len(str)] or [:cap(slice)],
    it's natural for the resulting pointer to point just past the end of
    the memory block.  If the next memory block is not live, we now have a
    live pointer to a dead block, which will unnecessarily keep the block
    alive.  That wastes space, and with the new Go 1.8 GC (not yet
    committed) will trigger an error when using GODEBUG=gccheckmark=1.

    This changes the implementation of slice expressions to not move the
    pointer if the resulting string length or slice capacity is 0.  When
    the length/capacity is zero, the pointer is never used anyhow.

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

commit 17527c35b027e1afcc318faf5563909e1e9d44a6
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 6 15:30:11 2017 -0700

    compiler: emit write barriers

    The Go 1.8 concurrent GC requires optional write barriers for all
    assignments that may change pointer values in the heap or in a global
    variable.  For details see https://blog.golang.org/go15gc.

    This changes the gofrontend code to emit write barriers as needed.
    This is in preparation for future changes.  At the moment the write
    barriers will do nothing.  They test runtime.writeBarrier.enabled,
    which will never be non-zero.  They call simple functions which just
    do a move without doing any of the other operations required by the
    write barrier.

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

commit c0b00f072bf34b2c288e1271ec8118b88c4f6f6f
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Tue Apr 11 17:47:29 2017 +0200

    libgo: allow building gox files from PIC objects

    libtool builds non-PIC objects in the same directory as .lo files
    and PIC objects in a .libs subdirectory.
    BUILDGOX rule uses the non-PIC objects to build the gox files,
    but on AIX only the PIC objects are built.

    Issue golang/go#19200

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

commit ea0f3da174c5503a209043f14ddda34871cfec52
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 6 19:06:14 2017 -0700

    compiler: add code to generate a ptrmask for a type

    The Go 1.8 garbage collector uses a ptrmask for all types below a
    certain size.  A ptrmask is simply a bit vector with a single bit for
    each pointer-sized word in the value.  The bit is 1 if the type has a
    pointer in that position, 0 if it does not.

    This change adds code to the compiler to generate a ptrmask.  The code
    is not used by anything yet, it is just compiled.  It will be used
    when we switch over to the Go 1.8 garbage collector.

    The new Array_type::int_length method, and the new memory_size
    methods, will also be used by other patches coming later.

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

commit 3029e1df3be3614d196a03c15e50e68ff850aa4c
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 7 10:31:39 2017 -0700

    compiler: add code to generate a gcprog for a type

    The Go 1.8 garbage collector uses a gcprog for all types above a
    certain size.  A gcprog describes where the pointers are in the type,
    using a simple bytecode machine that supports repeating bits.  The
    effect is to permit using much less space to describe arrays.  The
    format is described in runtime/mbitmap.go in the docs for runGCProg.
    This is not yet added to the gofrontend, but can be seen in the gc sources.

    This change adds code to the compiler to generate a gcprog.  The code
    is not used by anything yet, it is just compiled.  It will be used
    when we switch over to the Go 1.8 garbage collector.

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

commit 8b01ef1e9176d20f4c9e667972fe031069a4d057
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 13 07:00:35 2017 -0700

    compiler: add ptrdata computations and expressions

    For the upcoming Go 1.8 GC we need to compute the "ptrdata" of a type:
    the number of bytes in the type that can contain pointers.  For types
    that do not contain pointers this number is zero.  For many types it
    is a number larger than zero but smaller than the total size of the
    type.  The Go 1.8 GC uses this number to make loops looking for
    pointers run faster by not scanning the suffix of a value that can not
    contain a pointer.

    Unfortunately there are two subtly different definitions of ptrdata,
    and we need both.  The first is the simple one: the prefix that can
    contain pointers.  The second is the number of bytes described by the
    gcprog for the type.  Recall that we describe the exact position of
    pointers in a type using either a ptrmask or a gcprog.  The ptrmask is
    simpler, the gcprog uses less space.  We use the gcprog for large
    types, currently defined as types that are more than 2048 bytes.  When
    the Go 1.8 runtime expands a gcprog, it verifies that the gcprog
    describes exactly the same number of bytes as the ptrdata field in the
    type descriptor.  If the last pointer-containing portion of a type is
    an array, and if the elements of the array have a ptrdata that is less
    than the size of the element type, then the simple definition of the
    ptrdata will not include the final non-pointer-containing bytes of the
    last element of the array.  However, the gcprog will define the array
    using a repeat count, and will therefore include the full size of the
    last element of the array.  So for a type that needs a gcprog, the
    ptrdata field in the type descriptor must be the size of the data
    described by the gcprog, and that is not necessarily the same as the
    simple ptrdata.

    It might seem that we can always use the gcprog version of the ptrdata
    calculation, since that is what will appear in a type descriptor, but
    it turns out that for global variables we always use a ptrmask, not a
    gcprog, even if the global variable is large.  This is because gcprogs
    are handled by expanding them into a ptrmask at runtime, and for a
    global variable there is no natural place to put the ptrmask.  Simpler
    to always use the ptrmask.  That means that we need to describe the
    size of the ptrmask, and that means that we need an expression for the
    simple form of the ptrdata.

    This CL implements the ptrdata calculation.  This code is not actually
    used yet.  It will be used later when the Go 1.8 GC is committed.

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

commit 7a37331303b572412179a08141f1dd35339d40c8
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 06:55:48 2017 -0700

    compiler: zero length arrays never contain pointers

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

commit c242f0508a64d3d74a28d498cbaeda785ff76258
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 07:26:54 2017 -0700

    bytes: disable allocations test on gccgo

    It turns out that testing.AllocsPerRun has not been producing correct
    results with the current gccgo memory allocator.  When we update to
    the Go 1.8 memory allocator, testing.AllocsPerRun will work again, and
    this test will fail due to lack of escape analysis.

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

commit 0dc369f1d63376a36bfb0999a1b0377fd444bfab
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Tue Apr 11 16:22:38 2017 +0200

    os: alternative way to find executable path, using Args[0]

    AIX does not provide a proper way to find the original
    executable path from procfs, which contains just an
    hardlink.
    Executable path can be found using Args[0], Getcwd and
    $PATH.

    Issue golang/go#19200

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

commit f9bad1342569b338e3b2ea9f12ffc6d3d3fa3028
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 08:01:19 2017 -0700

    compiler: don't write struct with multiple sink fields to C header file

    When writing a struct to the C header file used by the C runtime code,
    a single sink field is fine: it will be called "_", which is valid C.
    There are structs with single sink fields that we want to write out,
    such as finblock.  As it happens, though, the Go 1.8 runtime has a
    struct with two sink fields, gcControllerState, which will produce a C
    definition with two fields named "_", which will fail.  Since we don't
    need to know that struct in C, rather than fix the general case, just
    punt if the struct has multiple sink fields.

    After the conversion to the Go 1.8 GC, we may be able to get rid of
    the C header file anyhow.  I'm not sure yet.

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

commit cfc28901a572aeb15b2f10a38f79eec04c64dfb2
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 10:07:23 2017 -0700

    runtime: disable allocations test on gccgo

    It turns out that testing.AllocsPerRun has not been producing correct
    results with the current gccgo memory allocator.  When we update to
    the Go 1.8 memory allocator, testing.AllocsPerRun will work again, and
    these tests will fail due to lack of escape analysis.

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

commit 36fedd76edaa48b9ec09709a70d9e4abaddf0caf
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 10:47:06 2017 -0700

    runtime: remove unused size argument from hash/equal fns

    The size argument was removed from hash and equal functions in CL
    34983.  Somehow I missed removing them from three of the predefined
    functions.

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

commit 90f6accb48d2e78cad8955b9292933f6ce3fe4c8
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 13:23:05 2017 -0700

    runtime: remove unused stack.go

    We're never going to use stack.go for gccgo.  Although a build tag
    keeps it from being built, even having it around can be confusing.
    Remove it.

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

commit befa71603fc66a214e01ac219f2bba36e19f136f
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 13:18:34 2017 -0700

    runtime: build fastlog

    Take out the build tags which were preventing fastlog2 from being
    built.  It's used by the upcoming Go 1.8 GC.

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

commit b7e19e9be4ab4c3cd8f4c9506d79a8cd56bace40
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Apr 14 10:04:23 2017 -0700

    runtime: add tests from Go 1.8

    Some runtime package tests never made it into the gofrontend repo for
    some reason.  Add them now.
    Reviewed-on: https://go-review.googlesource.com/40869

commit 1feef185aebd71bc2a09b9a04287461806096610
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon Apr 17 16:26:11 2017 -0700

    runtime: change mcall to take a Go function value

    For future work in bringing in the Go 1.8 GC, change the mcall
    function to take a Go function value, which means that mcall can take
    a closure rather than just a straight C function pointer.

    As part of this change move kickoff from C to Go, which we want to do
    anyhow so that we run the write barriers that it generates.

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

commit c3db34f4efc2d610f74a01dd2ad7775f48889b29
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Tue Apr 11 16:11:26 2017 +0200

    runtime: netpoll implementation for AIX

    Code courtesy of Damien Bergamini from Atos Infogérance.

    Issue golang/go#19200

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

commit f5634dff40e53ad9ce61afd67fd07334e3af9d1f
Author: Ian Lance Taylor <iant@golang.org>
Date:   Tue Apr 18 22:06:07 2017 -0700

    runtime: move mstart from Go to C

    The assignments done in mstart must be done without write barriers, as
    mstart is running without an m or p.  In the gc toolchain the
    equivalent code to intialize g and g->m is written in assembler;
    on GNU/Linux, it's in the clone function.

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

commit 671d7c74592f4b6fe3665af279482ba0ea47ca2d
Author: Ian Lance Taylor <iant@golang.org>
Date:   Tue Apr 18 17:47:28 2017 -0700

    compiler: varargs slices do not escape in runtime

    Also, don't try to allocate an empty slice on the stack, as it will
    confuse the GCC backend.

    Also add a few trivial style, code formatting, and debug output fixes.

    Updates golang/go#17431

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

commit 94699d25f31353bf03419eda56b15993a39f3275
Author: Ian Lance Taylor <iant@golang.org>
Date:   Tue Apr 18 17:30:09 2017 -0700

    compiler: add Ptrmask_symbol_expression

    Add an expression to evaluate to the ptrmask for a type.  This will be
    used for global variables, which always use a ptrmask no matter how
    large they are.

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

commit bfff1654eac5b9288fa6c431e66cba8c9da6a660
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon Apr 17 10:51:16 2017 -0700

    runtime: change g's in systemstack

    The systemstack function in the gc toolchain changes to a different g.
    This is often used to get more stack space; the gofrontend uses a
    different stack growth mechanism that does not require changing g's,
    so we've been running with a version of systemstack that keeps the
    same g.  However, the garbage collector has various tests to verify
    that it is running on g0 rather than on a normal g.  For simplicity,
    change the gofrontend version of systemstack to change to a different
    g just as the gc toolchain does.

    This permits us to uncomment some sanity checks in notetsleep.
    Doing that requires us to fix up a couple of places where C code calls
    {start,stop}TheWorldWithSema while not on g0.

    Note that this does slow down some code in the runtime package unnecessarily.
    It may be useful to find some places where the runtime calls
    systemstack only to get more stack space and change it to use some
    other function.  That other function would act like systemstack in the
    gc toolchain but simply call the argument in the gofrontend.

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

commit b2ccc7601ce71a7c5732154cf9b2eeea64681469
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 10:36:12 2017 -0700

    compiler, runtime: include ptrmask in GC roots

    Change the list of registered GC roots to include a ptrmask,
    and change the data structures to be easily used from Go code.
    The new ptrmask will be used by the Go 1.8 GC to only scan pointers.
    Tweak the current GC to use the new structures, but ignore the new
    ptrmask information for now.

    The new GC root data includes the size of the variable.  The size is
    not currently used, but will be used later by the cgo checking code.

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

commit 9e065149970bc180e4ca83bb99c74d9c4f43b47b
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 12:23:16 2017 -0700

    compiler, runtime: don't pass size to __go_new

    There is no reason to pass the size to __go_new, as the type
    descriptor includes the size anyhow.  This makes the function
    correspond to the Go 1.8 function runtime.newobject, which is what we
    will use when we update to the Go 1.8 memory allocator.

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

commit c321de7b738c4a3387c1842919c9305acfa04c57
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 13:13:56 2017 -0700

    compiler, runtime, reflect: make type descriptors more like Go 1.8

    Change the type descriptor structure to be more like the one in the Go
    1.8 runtime.  Specifically we add the ptrdata field, rename the gc
    field to gcdata and change the type to *byte, and rearrange a few of
    the fields.  The structure is still not identical to the Go 1.8
    structure--we don't use any of the tricks to reduce overall executable
    size--but it is more similar.

    For now we don't use the new ptrdata field, and the gcdata field is
    still the old format rather than the new Go 1.8 ptrmask/gcprog format.

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

commit 7b70c52cddeebea9ebeac003f8c6aad59497e5f0
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 14:54:29 2017 -0700

    reflect: make sure to clear unusable hash/equal function

    Otherwise we wind up copying the one from the prototype, which is wrong.

    Also rewrite the hash/equal functions to look like the ones in Go 1.8,
    mainly a matter of changing names and using arrayAt.

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

commit 84d26f467f7de8bdbb0d230458135fe1b6b2a99d
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 14:59:13 2017 -0700

    runtime: remove duplicate declarations of SetFinalizer/KeepAlive

    These should have been removed in CL 38794.  It's a bug that the
    compiler even permits these duplicate declarations.

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

commit f85ff7e64c24031f6d0bd7c9c426b6176cb95160
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 15:56:32 2017 -0700

    runtime: don't crash if panicstring called with no m

    It's possible for runtime_panicstring to be called with no m if a
    signal handler, or scheduler innards, do something wrong.  If that
    happens carry on with the panic rather than crashing.

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

commit 5b362b04f642afb8b20715930416fc3b7d91bb12
Author: Than McIntosh <thanm@google.com>
Date:   Fri Mar 31 14:35:48 2017 -0400

    compiler: fix for expr sharing introduced by Order_eval::statement.

    When processing an expression statement with a top-level call
    that returns multiple results, Order_eval::statement can wind up
    creating a tree that has multiple references to the same call,
    which results in a confusing AST dump. Change the implementation
    to avoid introducing this unwanted sharing.

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

commit b05b4260a68695bf9c9cc29e14ae86ca2699458a
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 16:00:28 2017 -0700

    runtime: restore correct m in gtraceback

    If gtraceback is used to get a stack trace of a g running in the same m,
    as can happen if we collect a stack trace from a g0, then restore the
    old m value, don't clear it.

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

commit ca8bbf4dfac19b3f4f7ce21a688b96a418c75031
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 16:03:24 2017 -0700

    runtime: set startpc field when starting a new goroutine

    This puts the right value in a trace--previously it was always zero.

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

commit ca8bbf4dfac19b3f4f7ce21a688b96a418c75031
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 16:03:24 2017 -0700

    runtime: set startpc field when starting a new goroutine

    This puts the right value in a trace--previously it was always zero.

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

commit 887690dce42d7bf8f711f8ea082e4928fb70f2a5
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 17:06:11 2017 -0700

    runtime: add prefetch functions

    The Go 1.8 GC uses prefetch functions.  Add versions for gccgo that
    call __builtin_prefetch.  Uncomment the test for them in testAtomic64.
    Don't force the check function to return early, as now taking the
    address of a local variable in the runtime package does not force it
    onto the heap.

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

commit 4269db69f9184e5a45c54aaee7352425a1f88bff
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 17:55:21 2017 -0700

    runtime: split up ticks to get correct alignment

    On 32-bit x86 a uint64 variable by itself is aligned to an 8-byte boundary.
    A uint64 field in a struct is aligned to a 4-byte boundary.
    The runtime.ticks variable has a uint64 field that must be aligned
    to an 8-byte boundary.  Rather than rely on luck, split up the struct
    into separate vars so that the required alignment happens reliably.

    It would be much nicer if issue golang/go#19057 were fixed somehow,
    but that is for another day.

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

commit 66926cabdbdbf3431b4f172f7756e195c1c6c513
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Apr 20 17:15:38 2017 +0200

    libgo: fix bad value for O_CLOEXEC on AIX 7.1

    On AIX 7.1, O_CLOEXEC is defined as 0x0000001000000000, which
    creates an integer constant overflow error when building libgo.

    This affects only 7.1, O_CLOEXEC is not defined on 6.1 (and
    defaults to O in sysinfo.go) and is defined as 0x00800000 on
    AIX 7.2.

    Issue golang/go#19200

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

commit af288ff10aeafc47651f5def327ed56425d5be19
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 20 17:15:02 2017 -0700

    runtime: preserve stack context in tracebackothers

    The tracebackothers function works by saving the current stack context
    in the goroutine's context field and then calling gogo to switch to a
    new goroutine.  The new goroutine will collect its own stack trace and
    then call gogo to switch back to the original goroutine.  This works
    fine, but if the original goroutine was called by mcall then the
    contents of its context field are needed to return from the mcall.
    Fix this by saving the stack context across the calls to the other
    goroutines.

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

commit 43101e5956e793f1b4de05c15d7738c785e927df
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Apr 21 10:58:52 2017 +0200

    os/user: use _posix_* libc functions

    libc getpwnam_r function has a different signature, we must use
    _posix_getpwnam_r instead (by default, the pwd.h system include
     file defines getpwnam_r as a static function calling
    _posix_getpwnam_r, so a C program calling getpwnam_r will indeed
    reference the _posix_getpwnam_r symbol).

    Idem for getpwuid_r, getgrnam_r and getgrgid_r.

    Issue golang/go#19200

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

commit 71e1fec4d2a536591ea6657a06916a17b5127071
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Apr 19 21:24:48 2017 -0700

    runtime: don't use pointers in g_ucontext_t or stackcontext

    The g_ucontext_t type holds registers saved for a goroutine.  We have
    to scan it for pointers, but since registers don't necessarily hold
    pointers we have to scan it conservatively.  That means that it should
    not have a pointer type, since the GC will always scan pointers.
    Instead it needs special treatment to be scanned conservatively.
    The current GC doesn't care when a pointer type holds a non-pointer,
    but the Go 1.8 GC does.

    For the current GC this means we have to explicitly scan the
    g_ucontext_t values in a G.

    While we're at it change stackcontext to be uintptr too.  The entries
    in stackcontext never hold pointers that the Go GC cares about.

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

commit eab2960aee91d3e3a6baa5b1bce01262d24c714f
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Apr 20 17:08:19 2017 -0700

    runtime/internal/sys: define Goexperiment

    The gc toolchain defines Goexperiment based on the environment
    variable GOEXPERIMENT when the toolchain is built.  We just always set
    Goexperiment to the empty string.

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

commit be4a751943265c0637da859d15a4faf162f5c478
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Thu Apr 20 14:04:35 2017 +0200

    net: sockopt implementation for AIX

    This is a copy of the Linux implementation, it allows to
    run some simple client/server applications on AIX, while
    the current sockopt stubs don't.

    Issue golang/go#19200

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

commit 46a669c4ca5b80fd6f6a0a42095804d9f704611d
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Mar 29 17:55:06 2017 +0200

    math: fix sign for atan/expm1/log1p(-0)

    AIX libc returns +0 for atan(-0), expm1(-0) and log1p(-0),
    while matching Go functions must return -0.

    Code courtesy of Tony Reix.

    Issue golang/go#19200

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

commit 53b0e809130038a46f0a3d2870e3905f44ab888d
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Apr 26 17:29:22 2017 +0200

    runtime: fix context clobbering on AIX

    On AIX 64-bits, r13 is a pointer to thread data.
    setcontext() overwrites r13 with the value saved by getcontext().
    So, when a goroutine is scheduled on a new thread, r13 will point
    to the old thread data after calling setcontext().

    Code courtesy of Damien Bergamini.

    Issue golang/go#19200

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

commit f8d5ebd71c71e6e777200530d8204b92619157f8
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Wed Apr 26 18:01:19 2017 +0200

    runtime: fix wrong time calculation in semasleep

    tv_nsec is added twice when calculating the sleep end time.

    Issue golang/go#19200

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

commit ef56097f4ea848d48fbf61eba1c757fe7fce99d3
Author: Matthieu Sarter <matthieu.sarter.external@atos.net>
Date:   Fri Apr 28 10:27:32 2017 +0200

    libgo: pass $(NM) value when running benchmarks

    On AIX, we need to use "nm -B" instead of "nm", to have the
    epxected output format, so the configured $(NM) value from
    the Makefile should be exported before running gotest, which
    defaults to "nm" if $NM is not set.

    Issue golang/go#19200

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

commit 0fb550083ae474fb964435927b899ec8e4b62771
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Nov 16 21:12:53 2016 -0800

    runtime: copy garbage collector from Go 1.8 runtime

    This giant patch replaces the old Go 1.4 memory allocator and garbage
    collector with the new Go 1.8 code.  The memory allocator is fairly
    similar, though now written in Go rather than C.  The garbage
    collector is completely different.  It now uses ptrmask and gcprog
    information, which requires changes in the compiler and the reflect
    package as well as the runtime.  And, of course, the garbage collector
    now runs concurrently with program execution.

    In the gc toolchain the garbage collector is strict and precise at all
    levels.  In the gofrontend we do not have stack maps, so stacks, and
    register values, are collected conservatively.  That means that an
    old, no longer used, pointer on a stack or in a register can cause a
    memory object to live longer than it should.  That in turns means that
    we must disable some checks for invalid pointers in the garbage
    collection code.  Not only can we get an invalid pointer on the stack;
    the concurrent nature of the collector means that we can in effect
    resurrect a block that was already unmarked but that the collector had
    not yet gotten around to freeing, and that block can in turn point to
    other blocks that the collector had managed to already free.  So we
    must disable pointer checks in general.  In effect we are relying on
    the fact that the strict pointer checks in the gc toolchain ensure
    that the garbage collector is correct, and we just assume that it is
    correct for the gofrontend since we are using the same code.

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

commit a95078d501175240d095500a8c5fbfb21bec65cb
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon Apr 24 16:33:47 2017 -0700

    libgo/Makefile: clean more files

    Fix up the mostlyclean, clean, and distclean targets to better follow
    https://www.gnu.org/prep/standards/html_node/Standard-Targets.html.

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

commit 5956bf1055451cf4239cdfeca259c23b1ded54d8
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon May 8 13:35:11 2017 -0700

    libgo: delete goc2c

    The last .goc file has been removed, so remove goc2c.

    The goc2c program was my first contribution to the gc repository that
    was more than 100 lines:
    https://github.com/golang/go/commit/2b57a1124e87b0dc8bc1ff6899297b4d7d6e74f2
    The program was used in gc for a few years under various guises but
    was finally removed in https://golang.org/cl/132680043.  Now we can
    remove it from gofrontend as well.

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

commit a222e35d041de0cd42506b61c93b8209e07702b9
Author: Than McIntosh <thanm@google.com>
Date:   Tue May 9 10:33:10 2017 -0400

    compiler: set "need_init_fn" when adding gc root

    Variables that back slice initializers in certain cases have to be
    added to the gc roots list, since they can be modified at runtime. The
    code that was doing this addition did not update the flag that tracks
    whether the package being compiled needs an initializer function,
    which resulted in the call in question being left out of the final
    generated code in certain cases. Fix is to change Gogo::add_gc_root()
    to update the "needs init" flag.

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

commit 822ab419bf7d1c705cdce1c12133e7a11f56be2e
Author: Than McIntosh <thanm@google.com>
Date:   Tue May 9 11:36:51 2017 -0400

    compiler: fix variable context nit in write barrier generation

    Update the write barrier generation code to insure that the "lvalue
    context" tag on the space var expression is set only in the case where
    the expr feeds directly into an assignment. This is somewhat
    counter-intuitive, but needed in the case where the backend looks at
    context tags.

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

From-SVN: r247848

7 years agoAdd missing PR numbers to ChangeLog entries
Peter Bergner [Wed, 10 May 2017 16:48:45 +0000 (11:48 -0500)]
Add missing PR numbers to ChangeLog entries

From-SVN: r247845

7 years agotree-cfg.c (gimple_seq_unreachable_p): New function.
Peter Bergner [Wed, 10 May 2017 16:44:45 +0000 (11:44 -0500)]
tree-cfg.c (gimple_seq_unreachable_p): New function.

gcc/
* tree-cfg.c (gimple_seq_unreachable_p): New function.
(assert_unreachable_fallthru_edge_p): Use it.
(group_case_labels_stmt): Likewise.
* tree-cfg.h: Prototype it.
* stmt.c: Include cfghooks.h and tree-cfg.h.
(emit_case_dispatch_table) <gap_label>: New local variable.
Use it to fill dispatch table gaps.
Test for default_label before updating probabilities.
(expand_case) <default_label>: Remove unneeded initialization.
Test for unreachable default case statement and remove its edge.
Set default_label accordingly.
* tree-ssa-ccp.c (optimize_unreachable): Update comment.

gcc/testsuite/
* gcc.target/powerpc/pr51513.c: New test.
* gcc.dg/predict-13.c: Replace __builtin_unreachable() with
__builtin_abort().
* gcc.dg/predict-14.c: Likewise.

From-SVN: r247844

7 years agopt.c (dependent_type_p): Make sure we aren't called with global_type_node.
Jason Merrill [Wed, 10 May 2017 16:32:13 +0000 (12:32 -0400)]
pt.c (dependent_type_p): Make sure we aren't called with global_type_node.

* pt.c (dependent_type_p): Make sure we aren't called with
global_type_node.

From-SVN: r247843

7 years agoPR c++/79549 - C++17 ICE with non-type auto template parameter pack
Jason Merrill [Wed, 10 May 2017 15:56:09 +0000 (11:56 -0400)]
PR c++/79549 - C++17 ICE with non-type auto template parameter pack

* pt.c (convert_template_argument): Just return an argument pack.
(coerce_template_parameter_pack, template_parm_to_arg)
(extract_fnparm_pack, make_argument_pack, tsubst_template_args)
(tsubst_decl, tsubst, type_unification_real, unify_pack_expansion):
Don't set the type of a NONTYPE_ARGUMENT_PACK.
* parser.c (make_char_string_pack, make_string_pack): Likewise.

From-SVN: r247842

7 years agors6000-c: Add support for built-in functions vector signed char vec_neg (vector...
Carl Love [Wed, 10 May 2017 15:54:41 +0000 (15:54 +0000)]
rs6000-c: Add support for built-in functions vector signed char vec_neg (vector...

gcc/ChangeLog:

2017-05-10  Carl Love  <cel@us.ibm.com>

   * config/rs6000/rs6000-c: Add support for built-in functions
   vector signed char        vec_neg (vector signed char)
   vector signed short int   vec_neg (vector short int)
   vector signed int         vec_neg (vector signed int)
   vector signed long long   vec_neg (vector signed long long)
   vector float              vec_neg (vector float)
   vector double             vec_neg (vector double)
   * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
   overload.
   * config/rs6000/altivec.h: Add define for vec_neg
   * doc/extend.texi: Update the built-in documentation for the
   new built-in functions.

gcc/testsuite/ChangeLog:

2017-05-10  Carl Love  <cel@us.ibm.com>
   * gcc.target/powerpc/builtins-3.c: Add tests for the new built-ins to
   to the test suite file.
   * gcc.target/powerpc/builtins-3-p8.c: Add tests for the new built-ins to
   to the test suite file.

From-SVN: r247841

7 years ago* g++.dg/template/crash126.C: Second error doesn't apply to C++17.
Jason Merrill [Wed, 10 May 2017 15:53:48 +0000 (11:53 -0400)]
* g++.dg/template/crash126.C: Second error doesn't apply to C++17.

From-SVN: r247840

7 years agore PR target/80687 (VLA usage in libgfortran; nvptx target: "sorry, unimplemented...
Thomas Koenig [Wed, 10 May 2017 15:45:52 +0000 (15:45 +0000)]
re PR target/80687 (VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca")

2017-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/80687
        PR fortran/80696
        * m4/matmul_internal.m4:  'matmul_name`:  Always
        use malloc/free to allocate t1.
        * 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: r247839

7 years agoraise-gcc.c (exception_class_eq): Make ec parameter const.
Bernd Edlinger [Wed, 10 May 2017 13:34:07 +0000 (13:34 +0000)]
raise-gcc.c (exception_class_eq): Make ec parameter const.

2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * raise-gcc.c (exception_class_eq): Make ec parameter const.

From-SVN: r247836

7 years agore PR tree-optimization/77644 (missed optimization with sqrt in comparison)
Prathamesh Kulkarni [Wed, 10 May 2017 13:26:09 +0000 (13:26 +0000)]
re PR tree-optimization/77644 (missed optimization with sqrt in comparison)

2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR tree-optimization/77644
* match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.

testsuite/
* gcc.dg/tree-ssa/pr77644.c: New test-case.

From-SVN: r247835

7 years agocp-tree.h (add_method, [...]): Change last arg to bool.
Nathan Sidwell [Wed, 10 May 2017 13:12:57 +0000 (13:12 +0000)]
cp-tree.h (add_method, [...]): Change last arg to bool.

gcc/cp/
* cp-tree.h (add_method, clone_function_decl): Change last arg to
bool.
* class.c (add_method): Change third arg to bool.  Adjust.
(one_inheriting_sig, one_inherited_ctor): Adjust.
(clone_function_decl): Change 2nd arg to bool.  Adjust.
(clone_constructors_and_destructors): Adjust.
* lambda.c (maybe_add_lambda_conv_op): Adjust.
* method.c (lazily_declare_fn): Adjust.
* pt.c (tsubst_decl, instantiate_template_1): Adjust.
* semantics.c (finish_member_declaration): Adjust.

libcc1/
* libcp1plugin.cc (plugin_build_decl): Adjust add_method call.

From-SVN: r247834

7 years agodumpfile.h (TDI_lang_all): New.
Nathan Sidwell [Wed, 10 May 2017 12:16:25 +0000 (12:16 +0000)]
dumpfile.h (TDI_lang_all): New.

* dumpfile.h (TDI_lang_all): New.
(TDF_KIND): New. Renumber others
(TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
than bits.
* dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
lang-all.
(get_dump_file_name): Adjust suffix generation.
(dump_enable_all): Use TDF_KIND.
* doc/invoke.texi (-fdump-lang-all): Document.

From-SVN: r247833

7 years ago* dumpfile.h: Tabify.
Nathan Sidwell [Wed, 10 May 2017 12:01:23 +0000 (12:01 +0000)]
* dumpfile.h: Tabify.

From-SVN: r247832

7 years agoMove an use-after-free access before the delete.
Wilco Dijkstra [Wed, 10 May 2017 11:01:26 +0000 (11:01 +0000)]
Move an use-after-free access before the delete.

    gcc/
PR target/80671
* config/aarch64/cortex-a57-fma-steering.c (merge_forest):
Move member access before delete.

From-SVN: r247831

7 years agoavoid remove&reinsert of call when splitting block for inlining
Alexandre Oliva [Wed, 10 May 2017 10:16:54 +0000 (10:16 +0000)]
avoid remove&reinsert of call when splitting block for inlining

We used to split the inlined-into block at (= after) the call, and then
remove the call from the first block to insert it in the second.

The removal may cause unnecessary and unrecoverable resetting of debug
insns: we do not generate debug temps for calls.

Avoid the remove-and-reinsert dance by splitting the block before the
call.

for  gcc/ChangeLog

* tree-inline.c (expand_call_inline): Split block at stmt
before the call.

for  gcc/testsuite/ChangeLog

* gcc.dg/guality/inline-params-2.c: New.

From-SVN: r247830

7 years agore PR c++/80145 ([c++1y] ICE after failed return type deduction)
Paolo Carlini [Wed, 10 May 2017 08:34:02 +0000 (08:34 +0000)]
re PR c++/80145 ([c++1y] ICE after failed return type deduction)

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

PR c++/80145
* decl.c (finish_function): To improve error recovery, change the
logic for calling apply_deduced_return_type.

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

PR c++/80145
* g++.dg/cpp1y/auto-fn37.C: New.
* g++.dg/cpp1y/auto-fn38.C: Likewise.

From-SVN: r247828

7 years agoDaily bump.
GCC Administrator [Wed, 10 May 2017 00:16:27 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247825

7 years agoMAINTAINERS: Move Kaz Kojima to Write After Approval section.
Kaz Kojima [Wed, 10 May 2017 00:01:26 +0000 (00:01 +0000)]
MAINTAINERS: Move Kaz Kojima to Write After Approval section.

From-SVN: r247821

7 years agore PR target/68163 (GCC on power8 does not issue the stxsspx instruction on power8)
Michael Meissner [Tue, 9 May 2017 21:25:23 +0000 (21:25 +0000)]
re PR target/68163 (GCC on power8 does not issue the stxsspx instruction on power8)

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

PR target/68163
* config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
are now unused after splitting mov{sf,sd}_hardfloat.
(f32_lr2): Likewise.
(f32_lm): Likewise.
(f32_lm2): Likewise.
(f32_li): Likewise.
(f32_li2): Likewise.
(f32_lv): Likewise.
(f32_sr): Likewise.
(f32_sr2): Likewise.
(f32_sm): Likewise.
(f32_sm2): Likewise.
(f32_si): Likewise.
(f32_si2): Likewise.
(f32_sv): Likewise.
(f32_dm): Likewise.
(f32_vsx): Likewise.
(f32_av): Likewise.
(mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
For movsf, order stores so the VSX stores occur before the GPR
store which encourages the register allocator to use a traditional
FPR instead of a GPR.  For movsd, order the stores so that the GPR
store comes before the VSX stores to allow the power6 to work.
This is due to the power6 not having a 32-bit integer store
instruction from a FPR.
(movsf_hardfloat): Likewise.
(movsd_hardfloat): Likewise.

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

PR target/68163
* gcc.target/powerpc/pr68163.c: New test.

From-SVN: r247819

7 years agore PR fortran/79311 ([OOP] ICE in generate_finalization_wrapper, at fortran/class...
Janus Weil [Tue, 9 May 2017 20:55:38 +0000 (22:55 +0200)]
re PR fortran/79311 ([OOP] ICE in generate_finalization_wrapper, at fortran/class.c:1992)

2017-05-09  Janus Weil  <janus@gcc.gnu.org>

PR fortran/79311
* resolve.c (gfc_resolve_finalizers): Ensure that derived-type
components have a their finalizers resolved, also if the superordinate
type itself has a finalizer.

2017-05-09  Janus Weil  <janus@gcc.gnu.org>

PR fortran/79311
* gfortran.dg/finalize_32.f90: New test.

From-SVN: r247818

7 years ago* class.c (check_bases): Ignore empty bases.
Jason Merrill [Tue, 9 May 2017 20:38:03 +0000 (16:38 -0400)]
* class.c (check_bases): Ignore empty bases.

From-SVN: r247816

7 years ago* g++.dg/cpp1z/direct-enum-init1.C: Correct error message.
Jason Merrill [Tue, 9 May 2017 20:37:57 +0000 (16:37 -0400)]
* g++.dg/cpp1z/direct-enum-init1.C: Correct error message.

From-SVN: r247815

7 years agoPR c++/70979 - literal class and closure types
Jason Merrill [Tue, 9 May 2017 20:37:51 +0000 (16:37 -0400)]
PR c++/70979 - literal class and closure types

* class.c (finalize_literal_type_property): Handle closures
specifically.
(explain_non_literal_class): Likewise.

From-SVN: r247814

7 years agoPR c++/66297, DR 1684 - literal class and constexpr member fns
Jason Merrill [Tue, 9 May 2017 20:37:44 +0000 (16:37 -0400)]
PR c++/66297, DR 1684 - literal class and constexpr member fns

* constexpr.c (is_valid_constexpr_fn): Only complain about
non-literal enclosing class in C++11.
* class.c (finalize_literal_type_property): Likewise.

From-SVN: r247813

7 years agoconfig.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* instead...
Andreas Tobler [Tue, 9 May 2017 20:37:25 +0000 (22:37 +0200)]
config.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* instead of the...

2017-05-09  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for
    arm*-*-freebsd* instead of the t-slibgcc-libgcc.

From-SVN: r247812

7 years agore PR c/35441 (pretty-printer cannot handle some expressions)
Volker Reichelt [Tue, 9 May 2017 19:09:22 +0000 (19:09 +0000)]
re PR c/35441 (pretty-printer cannot handle some expressions)

        PR c/35441
        * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
        MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
        (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
        (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
        RDIV_EXPR.
        (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.

        * gcc.dg/pr35441.c: New test.

From-SVN: r247810

7 years agore PR testsuite/80643 (NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223...
Martin Sebor [Tue, 9 May 2017 17:32:59 +0000 (17:32 +0000)]
re PR testsuite/80643 (NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c)

gcc/testsuite/ChangeLog:

PR testsuite/80643
* c-c++-common/Wsizeof-pointer-memaccess2.c: Prune -Wformat-overflow
output.

From-SVN: r247808

7 years agore PR c++/80186 (ICE on C++ code with invalid constructor: Segmentation fault (progra...
Paolo Carlini [Tue, 9 May 2017 16:56:34 +0000 (16:56 +0000)]
re PR c++/80186 (ICE on C++ code with invalid constructor: Segmentation fault (program cc1plus))

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

PR c++/80186
* pt.c (tsubst_decl): Early return error_mark_node if
grok_ctor_properties returns false.

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

PR c++/80186
* g++.dg/template/crash126.C: New.

From-SVN: r247807

7 years agoavx512f-vaddsd-2.c: Test fixed.
Sebastian Peryt [Tue, 9 May 2017 16:15:50 +0000 (18:15 +0200)]
avx512f-vaddsd-2.c: Test fixed.

* gcc.target/i386/avx512f-vaddsd-2.c: Test fixed.
* gcc.target/i386/avx512f-vaddss-2.c: Ditto.
* gcc.target/i386/avx512f-vsubsd-2.c: Ditto.
* gcc.target/i386/avx512f-vsubss-2.c: Ditto.

From-SVN: r247806

7 years agoAdd PR number.
Dominique d'Humieres [Tue, 9 May 2017 16:07:37 +0000 (18:07 +0200)]
Add PR number.

From-SVN: r247805

7 years agore PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c)
Martin Sebor [Tue, 9 May 2017 15:55:05 +0000 (15:55 +0000)]
re PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c)

gcc/ChangeLog:

PR translation/80280
* config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
added in r247778.

From-SVN: r247804

7 years agocoarray_lock_7.f90: Fix dg-final regexps.
Dominique d'Humieres [Tue, 9 May 2017 15:47:02 +0000 (17:47 +0200)]
coarray_lock_7.f90: Fix dg-final regexps.

2017-05-09  Dominique d'Humieres  <dominiq@lps.ens.fr>

* gfortran.dg/coarray_lock_7.f90: Fix dg-final regexps.

From-SVN: r247803

7 years agore PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c)
Martin Sebor [Tue, 9 May 2017 15:39:54 +0000 (15:39 +0000)]
re PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c)

gcc/ChangeLog:

PR translation/80280
* config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
data member added in r247778.
(ms_scanf_flag_specs, ms_strftime_flag_specs): Same.

From-SVN: r247801

7 years ago* tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
Nathan Sidwell [Tue, 9 May 2017 15:15:46 +0000 (15:15 +0000)]
* tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.

From-SVN: r247800

7 years ago* testsuite/24_iterators/container_access.cc (test03): Make il3 static.
Jason Merrill [Tue, 9 May 2017 15:11:19 +0000 (11:11 -0400)]
* testsuite/24_iterators/container_access.cc (test03): Make il3 static.

From-SVN: r247799

7 years ago[ARC] Add support for advanced mpy/mac instructions.
Claudiu Zissulescu [Tue, 9 May 2017 14:19:47 +0000 (16:19 +0200)]
[ARC] Add support for advanced mpy/mac instructions.

gcc/
2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_conditional_register_usage): Handle ACCL,
ACCH registers.
* config/arc/arc.md (mulsidi3): Use advanced mpy instructions when
available.
(umulsidi3): Likewise.
(mulsidi3_700): Disable this pattern when we have advanced mpy
instructions.
(umulsidi3_700): Likewise.
(maddsidi4): New pattern.
(macd, mac, mac_r, umaddsidi4, macdu, macu, macu_r): Likewise.
(mpyd_arcv2hs, mpyd_imm_arcv2hs, mpydu_arcv2hs): Likewise.
(mpydu_imm_arcv2hs): Likewise.
* config/arc/predicates.md (accl_operand): New predicate.

From-SVN: r247797

7 years ago[ARC]Fast interrupts support.
Claudiu Zissulescu [Tue, 9 May 2017 14:19:35 +0000 (16:19 +0200)]
[ARC]Fast interrupts support.

When a processor enters a fast interrupts handler, and duplicate
register banks are configured, the processor saves the user context by
saving the registers in the main register bank to these additional
registers in the duplicate register bank.  In this fast interrupt
context, when you specify the rgf_banked_regs option,the compiler does
not save the registers duplicated in the additional register bank are
not saved.

gcc/
2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>
    Andrew Burgess  <andrew.burgess@embecosm.com>

* config/arc/arc.c (ARC_AUTOBLINK_IRQ_P): Consider fast interrupts
case also.
(ARC_AUTOFP_IRQ_P): Likewise.
(ARC_AUTO_IRQ_P): Likewise.
(rgf_banked_register_count): New variable.
(parse_mrgf_banked_regs_option): New function.
(arc_override_options): Handle rgf_banked_regs option.
(arc_handle_interrupt_attribute): Add firq option.
(arc_compute_function_type): Return fast irq type when required.
(arc_must_save_register): Handle fast interrupts.
(arc_expand_prologue): Do not emit dwarf info for fast interrupts.
(arc_return_address_regs): Update.
* config/arc/arc.h (arc_return_address_regs): Update.
(arc_function_type): Add fast interrupt type.
(ARC_INTERRUPT_P): Update.
(RC_FAST_INTERRUPT_P): Define.
* config/arc/arc.md (simple_return): Update for fast interrupts.
(p_return_i): Likewise.
* config/arc/arc.opt (mrgf-banked-regs): New option.
* doc/invoke.texi (mrgf-banked-regs): Document.

testsuite/
2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>
    Andrew Burgess  <andrew.burgess@embecosm.com>

* gcc.target/arc/firq-1.c: New file.
* gcc.target/arc/firq-2.c: Likewise.
* gcc.target/arc/firq-3.c: Likewise.
* gcc.target/arc/firq-4.c: Likewise.
* gcc.target/arc/firq-5.c: Likewise.
* gcc.target/arc/firq-6.c: Likewise.

Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
From-SVN: r247796

7 years ago[ARC] Automatic context save/restore for regular interrupts.
Claudiu Zissulescu [Tue, 9 May 2017 14:19:22 +0000 (16:19 +0200)]
[ARC] Automatic context save/restore for regular interrupts.

The AUX_IRQ_CTRL register controls the behavior of automated register
save and restore or prologue and epilogue sequences during a non-fast
interrupt entry and exit, and context save and restore instructions.

A user passes to the compiler the configuration of the AUX_IRQ_CTRL
register via mirq-ctrl-saved option.  This option, specifies
gneral-purposes registers that the processor saves/restores on
interrupt entry and exit, and it is only valid for ARC EM and ARC HS
cores.

gcc/
2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (irq_ctrl_saved): New variable.
(ARC_AUTOBLINK_IRQ_P): Define.
(ARC_AUTOFP_IRQ_P): Likewise.
(ARC_AUTO_IRQ_P): Likewise.
(irq_range): New function.
(arc_must_save_register): Likewise.
(arc_must_save_return_addr): Likewise.
(arc_dwarf_emit_irq_save_regs): Likewise.
(arc_override_options): Handle deferred options.
(MUST_SAVE_REGISTER): Deleted, replaced by arc_must_save_register.
(MUST_SAVE_RETURN_ADDR): Deleted, replaced by
arc_must_save_return_addr.
(arc_compute_frame_size): Handle automated save and restore of
registers.
(arc_expand_prologue): Likewise.
(arc_expand_epilogue): Likewise.
* config/arc/arc.md (stack_irq_dwarf): New unspec instruction.
* config/arc/arc.opt (mirq-ctrl-saved): New option.
* doc/invoke.texi (mirq-ctrl-saved): Document option.

testsuite/
2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/interrupt-5.c: Newfile.
* gcc.target/arc/interrupt-6.c: Likewise.
* gcc.target/arc/interrupt-7.c: Likewise.
* gcc.target/arc/interrupt-8.c: Likewise.
* gcc.target/arc/interrupt-9.c: Likewise.

From-SVN: r247795

7 years agovect-44.c: Add --param vect-max-peeling-for-alignment=0 and adjust.
Richard Biener [Tue, 9 May 2017 14:07:01 +0000 (14:07 +0000)]
vect-44.c: Add --param vect-max-peeling-for-alignment=0 and adjust.

2017-05-09  Richard Biener  <rguenther@suse.de>

* gcc.dg/vect/vect-44.c: Add --param vect-max-peeling-for-alignment=0
and adjust.
* gcc.dg/vect/vect-50.c: Likewise.

From-SVN: r247794

7 years agoPR c++/70167 - array prvalue treated as lvalue
Jason Merrill [Tue, 9 May 2017 13:48:58 +0000 (09:48 -0400)]
PR c++/70167 - array prvalue treated as lvalue

* cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New.
(enum fcl_t): New.
* semantics.c (finish_compound_literal): Add fcl_context parameter.
Only make a static variable for C99 syntax.
* parser.c (cp_parser_postfix_expression): Pass it.
* pt.c (tsubst_copy_and_build): Likewise.
* call.c (extend_ref_init_temps): Set
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.

From-SVN: r247793

7 years agoipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope typedefs.
Nathan Sidwell [Tue, 9 May 2017 13:03:41 +0000 (13:03 +0000)]
ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope typedefs.

* ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
typedefs.

From-SVN: r247791

7 years agore PR c/80525 (-Wlogical-op confused by undefined integer overflow)
Marek Polacek [Tue, 9 May 2017 11:21:14 +0000 (11:21 +0000)]
re PR c/80525 (-Wlogical-op confused by undefined integer overflow)

PR c/80525
* c-warn.c (unwrap_c_maybe_const): New.
(warn_logical_operator): Call it.

* c-c++-common/Wlogical-op-1.c: Don't use -fwrapv anymore.
* c-c++-common/Wlogical-op-2.c: New test.

From-SVN: r247786

7 years agoc-tree.h (pushdecl): Declare.
Nathan Sidwell [Tue, 9 May 2017 11:17:45 +0000 (11:17 +0000)]
c-tree.h (pushdecl): Declare.

gcc/c/
* c-tree.h (pushdecl): Declare.
gcc/cp/
* cp-lang.c (get_global_decls, cxx_pushdecl): New.
(LANG_HOOKS_GETDECLS, LANG_HOOKS_PUSHDECL): Override.
* name-lookup.h (pushdecl_top_level): Declare.
gcc/c-family/
* c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
* c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
gcc/objc/
* objc-gnu-runtime-abi-01.c (objc_add_static_instance): Use
pushdecl lang_hook.

From-SVN: r247785

7 years ago* doc/invoke.texi: Fix typo.
Marek Polacek [Tue, 9 May 2017 10:53:49 +0000 (10:53 +0000)]
* doc/invoke.texi: Fix typo.

From-SVN: r247784

7 years agotree-vrp.c (vrp_val_is_max): Adjust comment.
Richard Biener [Tue, 9 May 2017 10:22:27 +0000 (10:22 +0000)]
tree-vrp.c (vrp_val_is_max): Adjust comment.

2017-05-09  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (vrp_val_is_max): Adjust comment.
(vrp_val_is_min): Likewise.
(set_value_range_to_value): Likewise.
(set_value_range_to_nonnegative): Likewise.
(gimple_assign_nonzero_p): Likewise.
(gimple_stmt_nonzero_p): Likewise.
(vrp_int_const_binop): Likewise.  Remove unreachable case.
(adjust_range_with_scev): Adjust comments.
(compare_range_with_value): Likewise.
(extract_range_from_phi_node): Likewise.
(test_for_singularity): Likewise.

From-SVN: r247783

7 years agoFix broken cunroll-13.c for avr target
Senthil Kumar Selvaraj [Tue, 9 May 2017 09:59:25 +0000 (09:59 +0000)]
Fix broken cunroll-13.c for avr target

The test reports bogus failures because the loop variable i is declared
as int, and the constant expected in the dump doesn't fit in an int for avr.
Fixed by explicitly using __INT32_TYPE__ for targets with __SIZEOF_INT__ < 4.

gcc/testsuite/

2017-05-09  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/tree-ssa/cunroll-13.c: Use __INT32_TYPE__ for
for targets with __SIZEOF_INT__ < 4.

From-SVN: r247782

7 years agotree-vrp.c (get_single_symbol): Add assert that we don't get overflowed constants...
Richard Biener [Tue, 9 May 2017 08:14:44 +0000 (08:14 +0000)]
tree-vrp.c (get_single_symbol): Add assert that we don't get overflowed constants as invariant part.

2017-05-09  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (get_single_symbol): Add assert that we don't
get overflowed constants as invariant part.
(compare_values_warnv): Add comment before the TREE_NO_WARNING
checks.  Use wi::cmp instead of recursing for integer constants.
(compare_values): Just ignore whether we assumed undefined
overflow instead of failing the compare.
(extract_range_for_var_from_comparison_expr): Add comment before the
TREE_NO_WARNING sets.
(test_for_singularity): Likewise.
(extract_range_from_comparison): Do not disable optimization
when we assumed undefined overflow.
(extract_range_basic): Remove init of unused var.

From-SVN: r247781

7 years agovect-50.c: Revert last change.
Richard Biener [Tue, 9 May 2017 08:07:47 +0000 (08:07 +0000)]
vect-50.c: Revert last change.

2017-05-09  Richard Biener  <rguenther@suse.de>

* gcc.dg/vect/vect-50.c: Revert last change.
* gcc.dg/vect/vect-44.c: Likewise.

From-SVN: r247780

7 years agotree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
Richard Biener [Tue, 9 May 2017 07:57:04 +0000 (07:57 +0000)]
tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.

2017-05-09  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
(extract_range_from_multiplicative_op_1): Adjust.
(extract_range_from_binary_expr_1): Use int_const_binop.

From-SVN: r247779

7 years agoPR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
Martin Sebor [Tue, 9 May 2017 02:47:14 +0000 (02:47 +0000)]
PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/c-family/ChangeLog:

PR translation/80280
* c-format.h (struct format_flag_spec): Add new member.
(T89_T): New macro.
* c-format.c (local_tree_type_node): New global.
(printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
(gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
(strfmon_flag_specs): Likewise.
(gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
with distinct quoting properties.
(gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
(flag_chars_t::validate): Add argument and handle bad quoting.
(check_format_info_main): Handle quoting problems.
(init_dynamic_diag_info): Simplify.

gcc/testsuite/ChangeLog:

PR translation/80280
* gcc.dg/format/gcc_diag-10.c: New test.

From-SVN: r247778

7 years agore PR target/80101 (ICE in store_data_bypass_p, at recog.c:3737)
Kelvin Nilsen [Tue, 9 May 2017 01:15:46 +0000 (01:15 +0000)]
re PR target/80101 (ICE in store_data_bypass_p, at recog.c:3737)

gcc/testsuite/ChangeLog:

2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/80101
* gcc.target/powerpc/pr80101-1.c: New test.

gcc/ChangeLog:

2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/80101
* config/rs6000/power6.md: Replace store_data_bypass_p calls with
rs6000_store_data_bypass_p in seven define_bypass directives and
in several comments.
* config/rs6000/rs6000-protos.h: Add prototype for
rs6000_store_data_bypass_p function.
* config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
function implements slightly different (rs6000-specific) semantics
than store_data_bypass_p, returning false rather than aborting
with assertion error when arguments do not satisfy the
requirements of store data bypass.
(rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
rs6000_store_data_bypass_p.

From-SVN: r247777

7 years agoDaily bump.
GCC Administrator [Tue, 9 May 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247776

7 years agoxtensa: add support for SSP
Max Filippov [Mon, 8 May 2017 23:53:14 +0000 (23:53 +0000)]
xtensa: add support for SSP

gcc/
2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa-protos.h
        (xtensa_initial_elimination_offset): New declaration.
* config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
New function. Move its body from the INITIAL_ELIMINATION_OFFSET
macro definition, add case for FRAME_POINTER_REGNUM when
FRAME_GROWS_DOWNWARD.
* config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro
definition.
(INITIAL_ELIMINATION_OFFSET): Replace body with call to
xtensa_initial_elimination_offset.

From-SVN: r247771

7 years ago* doc/invoke.texi: Alphabetize -fdump options.
Nathan Sidwell [Mon, 8 May 2017 21:52:53 +0000 (21:52 +0000)]
* doc/invoke.texi: Alphabetize -fdump options.

From-SVN: r247760

7 years agore PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c)
Martin Sebor [Mon, 8 May 2017 20:50:24 +0000 (20:50 +0000)]
re PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c)

gcc/ChangeLog:

PR translation/80280
* config/sol2-c.c (solaris_pragma_align): Correct quoting.

From-SVN: r247758

7 years agoPR c++/80178 - parameter passing for uncopyable classes
Jason Merrill [Mon, 8 May 2017 19:08:07 +0000 (15:08 -0400)]
PR c++/80178 - parameter passing for uncopyable classes

* tree.c (type_has_nontrivial_copy_init): True for classes with only
deleted copy/move ctors.
(remember_deleted_copy, maybe_warn_parm_abi): New.
* decl.c (require_complete_types_for_parms, check_function_type):
Call maybe_warn_parm_abi.
* call.c (convert_for_arg_passing, build_cxx_call): Likewise.

From-SVN: r247757

7 years agoBump C++ ABI version.
Jason Merrill [Mon, 8 May 2017 18:45:42 +0000 (14:45 -0400)]
Bump C++ ABI version.

* c-opts.c (c_common_post_options): Update defaults for
flag_abi_version and flag_abi_compat_version.

From-SVN: r247756

7 years agore PR fortran/79930 (Potentially Missed Optimisation for MATMUL / DOT_PRODUCT)
Thomas Koenig [Mon, 8 May 2017 18:22:44 +0000 (18:22 +0000)]
re PR fortran/79930 (Potentially Missed Optimisation for MATMUL / DOT_PRODUCT)

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/79930
* frontend-passes.c (matmul_to_var_expr): New function,
add prototype.
(matmul_to_var_code):  Likewise.
(optimize_namespace):  Use them from gfc_code_walker.

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/79930
* gfortran.dg/inline_transpose_1.f90:  Add
-finline-matmul-limit=0 to options.
* gfortran.dg/matmul_5.f90:  Likewise.
* gfortran.dg/vect/vect-8.f90: Likewise.
* gfortran.dg/inline_matmul_14.f90:  New test.
* gfortran.dg/inline_matmul_15.f90:  New test.

From-SVN: r247755

7 years agodecl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing.
Nathan Sidwell [Mon, 8 May 2017 17:59:03 +0000 (17:59 +0000)]
decl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing.

* decl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing.
(start_preparsed_function): Do decl pushing before setting
current_funciton_decl and announcing it.

From-SVN: r247754

7 years agore PR libfortran/80602 (Reduce stack usage for blocked matmul)
Thomas Koenig [Mon, 8 May 2017 17:56:13 +0000 (17:56 +0000)]
re PR libfortran/80602 (Reduce stack usage for blocked matmul)

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/80602
* m4/matmul_internal.m4:  'matmul_name`:  Change
t1 to a VLA of the required size.
        * 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.

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/80602
* gfortran.dg/matmul_15.f90:  New test case.

From-SVN: r247753

7 years agoname-lookup.h (pushdecl_with_scope): Replace with ...
Nathan Sidwell [Mon, 8 May 2017 17:54:55 +0000 (17:54 +0000)]
name-lookup.h (pushdecl_with_scope): Replace with ...

* name-lookup.h (pushdecl_with_scope): Replace with ...
(pushdecl_outermost_localscope): ... this.
* name-lookup.c (pushdecl_with_scope): Replace with ...
(pushdecl_outermost_localscope): ... this.
(pushdecl_namespace_level): Adjust.
* decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope.
* lambda.c (insert_capture_proxy): Likewise.

From-SVN: r247752

7 years agotarget.def (compute_frame_layout): New optional target hook.
Bernd Edlinger [Mon, 8 May 2017 17:44:36 +0000 (17:44 +0000)]
target.def (compute_frame_layout): New optional target hook.

2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * target.def (compute_frame_layout): New optional target hook.
        * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
        * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
        * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
        target hook.
        * reload1.c (verify_initial_elim_offsets): Likewise.
        * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
        (use_simple_return_p): Call arm_compute_frame_layout if needed.
        (arm_get_frame_offsets): Split up into this ...
        (arm_compute_frame_layout): ... and this function.

From-SVN: r247750

7 years agoTweak static assertions in std::optional
Jonathan Wakely [Mon, 8 May 2017 17:13:38 +0000 (18:13 +0100)]
Tweak static assertions in std::optional

* include/std/optional: Use a separate static_assert per condition.
* testsuite/20_util/optional/cons/value_neg.cc: Update dg-error line
numbers.

From-SVN: r247748

7 years agoclass.c (build_vtbl_initializer): Don't shadow outer variable with static var.
Nathan Sidwell [Mon, 8 May 2017 16:58:44 +0000 (16:58 +0000)]
class.c (build_vtbl_initializer): Don't shadow outer variable with static var.

* class.c (build_vtbl_initializer): Don't shadow outer variable
with static var.

From-SVN: r247747

7 years ago[AArch64] Tighten move constraints for symbolic operands
Richard Sandiford [Mon, 8 May 2017 16:18:49 +0000 (16:18 +0000)]
[AArch64] Tighten move constraints for symbolic operands

The movsi and movdi constraints allowed the source to be any
absolute symbolic expression ("S").  That's OK for operands that
have already been vetted by the aarch64_mov_operand predicate but
causes problems if the register allocator substitutes an equivalence
(the usual "the constraints can't accept more than the predicates"
restriction).

Although all other uses of "S" in the backend are redundant and could
in principle be removed, "S" itself is a publicly-documented constraint
and so we'd have to keep its definition.  This patch therefore adds a
new "Usa" constraint for legitimate absolute address operands.

2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/constraints.md (Usa): New constraint.
* config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.

From-SVN: r247746

7 years agoRevert _binding -> _value change.
Nathan Sidwell [Mon, 8 May 2017 15:51:57 +0000 (15:51 +0000)]
Revert _binding -> _value change.

* name-lookup.h (get_namespace_value, set_global_value): Rename to
...
(get_namespace_binding, set_global_binding): ... these.
* name-lookup.c (get_namespace_value, set_global_value): Rename to
...
(get_namespace_binding, set_global_binding): ... these.
(arg_assoc_namespace, pushdecl_maybe_friend_1)
check_for_out_of_scope_variable, push_overloaded_decl_1,
lookup_name_innermost_nonclass_level, push_namespace): Adjust.
* cp-tree.h (IDENTIFIER_GLOBAL_VALUE)
SET_IDENTIFIER_GLOBAL_VALUE): Adjust.
* decl.c (poplevel): Adjust.
* pt.c (make_constrained_auto): Likewise.
((--This line, and those below, will be ignored--

M    cp/cp-tree.h
M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/decl.c
M    cp/ChangeLog
M    cp/pt.c

From-SVN: r247745

7 years ago* es.po, sv.po: Update.
Joseph Myers [Mon, 8 May 2017 15:42:27 +0000 (16:42 +0100)]
* es.po, sv.po: Update.

From-SVN: r247743

7 years agoClarify mt_allocator documentation w.r.t deallocation
Jonathan Wakely [Mon, 8 May 2017 15:09:08 +0000 (16:09 +0100)]
Clarify mt_allocator documentation w.r.t deallocation

* doc/xml/manual/mt_allocator.xml: Clarify deallocation behaviour.
* doc/html/*: Regenerate.

From-SVN: r247742

7 years agoDefine TM_MULTILIB_CONFIG for ARM multilib
Thomas Preud'homme [Mon, 8 May 2017 14:35:56 +0000 (14:35 +0000)]
Define TM_MULTILIB_CONFIG for ARM multilib

TM_MULTILIB_CONFIG is not set in config.gcc when building with multilib
for arm targets, leading to config/arm/t-multilib not including any of
the files (t-aprofile and t-rmprofile) definining the architecture and
FPU to build multilib for. This patch fixes that by setting
TM_MULTILIB_CONFIG to with_multilib_list's value after it has been
checked. It also fix a trailing whitespace issue.

2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
    with_multilib_list after it has been checked.

From-SVN: r247741

This page took 0.138572 seconds and 5 git commands to generate.