Commit Graph

162269 Commits

Author SHA1 Message Date
Jakub Jelinek f41b7612a9 re PR c++/86210 (Missing -Wnonnull warning for function defined in the same TU)
PR c++/86210
	* c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
	comment.

	* g++.dg/warn/Wnonnull4.C: New test.

From-SVN: r261811
2018-06-20 18:07:21 +02:00
Jonathan Wakely d9addf3344 Add testcase accidentally not committed earlier
* testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
	missed from recent commit.

From-SVN: r261810
2018-06-20 16:54:57 +01:00
Marek Polacek e28fadbc06 re PR c++/86240 (ice: unexpected expression absu_expr)
PR c++/86240
	* constexpr.c (cxx_eval_constant_expression): Handle ABSU_EXPR.
	(fold_simple_1): Likewise.
	* error.c (dump_expr): Likewise.

	* g++.dg/pr86240.C: New test.

From-SVN: r261809
2018-06-20 15:46:02 +00:00
Jakub Jelinek 125fe9abf3 re PR debug/86194 (ICE: SIGSEGV in avoid_constant_pool_reference (simplify-rtx.c:215) with -O -g -mavx512bw)
PR debug/86194
	* var-tracking.c (use_narrower_mode_test): Check if shift amount can
	be narrowed.

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

From-SVN: r261807
2018-06-20 16:51:04 +02:00
Jakub Jelinek c81a5aecc5 re PR tree-optimization/86231 (vrp_meet causes wrong-code)
PR tree-optimization/86231
	* tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
	anti-range don't overwrite *vr0min before using it to compute *vr0max.

	* gcc.dg/tree-ssa/vrp119.c: New test.
	* gcc.c-torture/execute/pr86231.c: New test.

From-SVN: r261805
2018-06-20 16:47:28 +02:00
Tom de Vries 60f02f9021 Generate correctly typed compare in canonicalize_loop_ivs
2018-06-20  Tom de Vries  <tdevries@suse.de>

	PR tree-optimization/86097
	* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
	iv type if signedness of iv type is not the same as that of *nit.

	* gcc.dg/autopar/pr86097.c: New test.

From-SVN: r261804
2018-06-20 14:44:45 +00:00
Jakub Jelinek d53e8ef490 cfgrtl.c (rtl_verify_edges): Formatting fix.
* cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
	EDGE_EH edges, verify they are all EDGE_EH.

From-SVN: r261803
2018-06-20 16:42:19 +02:00
Nathan Sidwell 335a120f7f [PR c++/85634] Fix tsubst ICE
https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01237.html
	PR c++/85634
	* cp-tree.h (lookup_keep): Drop KEEP parm.
	(lookup_list_keep): Delete.
	(maybe_get_fns): Declare.
	* parser.c (cp_parser_primary_expression): Call lookup_keep here.
	(cp_parser_template_id): Not here ...
	* decl.c (cp_finish_decl): ... nor here ...
	* init.c (build_raw_new_expr): ... nor here ...
	* pt.c (process_template_parm): ... nor here ...
	* semantics.c (perform_koenig_lookup): Call lookup_keep.
	(finish_call_expr): Not here.
	* tree.c (ovl_cache): Delete.
	(ovl_make, ovl_copy): No cache.
	(lookup_keep): Always keep.
	(lookup_list_keep): Delete.
	(maybe_get_fns): New, broken out of ...
	(get_fns): ... here.  Call it.
	(built_min_nt_loc, build_min, build_min_non_dep): Drop lookup_keep.
	(build_min_nt_call_vec): Likewise.

	PR c++/85634
	* g++.dg/lookup/pr85634.C: New.

From-SVN: r261802
2018-06-20 14:34:06 +00:00
Martin Liska b54006ae92 Remove not longer valid FIXME comment.
2018-06-20  Martin Liska  <mliska@suse.cz>

	* lto-symtab.c (lto_symtab_merge_p): Remove not valid
        FIXME comment.

From-SVN: r261798
2018-06-20 10:01:18 +00:00
Maya Rashish ada818fda1 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
From-SVN: r261797
2018-06-20 09:54:35 +00:00
Kyrylo Tkachov 9f5361c8ca [AArch64] Support for LDP/STP of Q-registers
This patch adds support for generating LDPs and STPs of Q-registers.
This allows for more compact code generation and makes better use of the ISA.

It's implemented in a straightforward way by allowing 16-byte modes in the
sched-fusion machinery and adding appropriate peepholes in aarch64-ldpstp.md
as well as the patterns themselves in aarch64-simd.md.

It adds a new no_ldp_stp_qregs tuning flag.
I use it to restrict the peepholes in aarch64-ldpstp.md from merging the
operations together into PARALLELs. I also use it to restrict the sched fusion
check that brings such loads and stores together. This is enough to avoid
forming the pairs when the tuning flag is set.

I didn't see any non-noise performance effect on SPEC2017 on Cortex-A72 and Cortex-A53.

        * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
        * config/aarch64/aarch64.c (xgene1_tunings): Add
        AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
        (aarch64_mode_valid_for_sched_fusion_p):
        Allow 16-byte modes.
        (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
        * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
        128-bit modes.
        * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
        New pattern.
        (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
        * config/aarch64/iterators.md (VQ2): New mode iterator.

        * gcc.target/aarch64/ldp_stp_q.c: New test.
        * gcc.target/aarch64/stp_vec_128_1.c: Likewise.
        * gcc.target/aarch64/ldp_stp_q_disable.c: Likewise.

From-SVN: r261796
2018-06-20 08:57:17 +00:00
Martin Liska de840bde88 Change default for jump_table expansion ratio to 8.
2018-06-20  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
        Change default ratio from 10 to 8.

From-SVN: r261795
2018-06-20 08:52:55 +00:00
Martin Liska 2f928c1b63 Enable clustering for switch statements.
2018-06-20  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
        New.
	(bit_test_cluster::find_bit_tests): Likewise.
	(switch_decision_tree::analyze_switch_statement): Find clusters.
	* tree-switch-conversion.h (struct jump_table_cluster): Document
        hierarchy.

From-SVN: r261794
2018-06-20 08:52:35 +00:00
Martin Liska dc223ad489 Switch other switch expansion methods into classes.
2018-06-20  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (switch_conversion::collect):
        Record m_uniq property.
	(switch_conversion::expand): Bail out for special conditions.
	(group_cluster::~group_cluster): New.
	(group_cluster::group_cluster): Likewise.
	(group_cluster::dump): Likewise.
	(jump_table_cluster::emit): New.
	(switch_decision_tree::fix_phi_operands_for_edges): New.
	(struct case_node): Remove struct.
	(jump_table_cluster::can_be_handled): New.
	(case_values_threshold): Moved to header.
	(reset_out_edges_aux): Likewise.
	(jump_table_cluster::is_beneficial): New.
	(bit_test_cluster::can_be_handled): Likewise.
	(add_case_node): Remove.
	(bit_test_cluster::is_beneficial): New.
	(case_bit_test::cmp): New.
	(bit_test_cluster::emit): New.
	(expand_switch_as_decision_tree_p): Remove.
	(bit_test_cluster::hoist_edge_and_branch_if_true): New.
	(fix_phi_operands_for_edge): Likewise.
	(switch_decision_tree::analyze_switch_statement): New.
	(compute_cases_per_edge): Move ...
	(switch_decision_tree::compute_cases_per_edge): ... here.
	(try_switch_expansion): Likewise.
	(switch_decision_tree::try_switch_expansion): Likewise.
	(record_phi_operand_mapping): Likewise.
	(switch_decision_tree::record_phi_operand_mapping): Likewise.
	(emit_case_decision_tree): Likewise.
	(switch_decision_tree::emit): Likewise.
	(balance_case_nodes): Likewise.
	(switch_decision_tree::balance_case_nodes): Likewise.
	(dump_case_nodes): Likewise.
	(switch_decision_tree::dump_case_nodes): Likewise.
	(emit_jump): Likewise.
	(switch_decision_tree::emit_jump): Likewise.
	(emit_cmp_and_jump_insns): Likewise.
	(switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
	(emit_case_nodes): Likewise.
	(switch_decision_tree::emit_case_nodes): Likewise.
	(conditional_probability): Remove.
	* tree-switch-conversion.h (enum cluster_type): New.
	(PRINT_CASE): New.
	(struct cluster): Likewise.
	(cluster::cluster): Likewise.
	(struct simple_cluster): Likewise.
	(simple_cluster::simple_cluster): Likewise.
	(struct group_cluster): Likewise.
	(struct jump_table_cluster): Likewise.
	(struct bit_test_cluster): Likewise.
	(struct min_cluster_item): Likewise.
	(struct case_tree_node): Likewise.
	(case_tree_node::case_tree_node): Likewise.
	(jump_table_cluster::case_values_threshold): Likewise.
	(struct case_bit_test): Likewise.
	(struct switch_decision_tree): Likewise.
	(struct switch_conversion): Likewise.
	(switch_decision_tree::reset_out_edges_aux): Likewise.
2018-06-20  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-ssa/vrp104.c: Grep just for GIMPLE IL.

From-SVN: r261793
2018-06-20 08:52:12 +00:00
Martin Liska 789410e482 Transform switch_conversion into a class.
2018-06-20  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
	(hoist_edge_and_branch_if_true): Likewise.
	(expand_switch_using_bit_tests_p): Likewise.
	(struct case_bit_test): Likewise.
	(case_bit_test_cmp): Likewise.
	(emit_case_bit_tests): Likewise.
	(switch_conversion::switch_conversion): New class.
	(struct switch_conv_info): Remove old struct.
	(collect_switch_conv_info): More to ...
	(switch_conversion::collect): ... this.
	(check_range): Likewise.
	(switch_conversion::check_range): Likewise.
	(check_all_empty_except_final): Likewise.
	(switch_conversion::check_all_empty_except_final): Likewise.
	(check_final_bb): Likewise.
	(switch_conversion::check_final_bb): Likewise.
	(create_temp_arrays): Likewise.
	(switch_conversion::create_temp_arrays): Likewise.
	(free_temp_arrays): Likewise.
	(gather_default_values): Likewise.
	(switch_conversion::gather_default_values): Likewise.
	(build_constructors): Likewise.
	(switch_conversion::build_constructors): Likewise.
	(constructor_contains_same_values_p): Likewise.
	(switch_conversion::contains_same_values_p): Likewise.
	(array_value_type): Likewise.
	(switch_conversion::array_value_type): Likewise.
	(build_one_array): Likewise.
	(switch_conversion::build_one_array): Likewise.
	(build_arrays): Likewise.
	(switch_conversion::build_arrays): Likewise.
	(gen_def_assigns): Likewise.
	(switch_conversion::gen_def_assigns): Likewise.
	(prune_bbs): Likewise.
	(switch_conversion::prune_bbs): Likewise.
	(fix_phi_nodes): Likewise.
	(switch_conversion::fix_phi_nodes): Likewise.
	(gen_inbound_check): Likewise.
	(switch_conversion::gen_inbound_check): Likewise.
	(process_switch): Use the newly created class.
	(switch_conversion::expand): New.
	(switch_conversion::~switch_conversion): New.
	* tree-switch-conversion.h: New file.

From-SVN: r261792
2018-06-20 08:51:45 +00:00
Richard Sandiford 1cbfeccc8d [8/n] PR85694: Make patterns check for target support
This patch makes pattern recognisers do their own checking for vector
types and target support.  Previously some recognisers did this
themselves and some left it to vect_pattern_recog_1.

Doing this means we can get rid of the type_in argument, which was
ignored if the recogniser did its own checking.  It also means
we create fewer junk statements.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
	tree-vect-patterns.c.
	* tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
	(vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
	(vect_recog_sad_pattern): Likewise.
	(vect_recog_widen_sum_pattern): Likewise.
	(vect_recog_pow_pattern): Likewise.  Check for a null vectype.
	(vect_recog_widen_shift_pattern): Remove the type_in argument.
	(vect_recog_rotate_pattern): Likewise.
	(vect_recog_mult_pattern): Likewise.
	(vect_recog_vector_vector_shift_pattern): Likewise.
	(vect_recog_divmod_pattern): Likewise.
	(vect_recog_mixed_size_cond_pattern): Likewise.
	(vect_recog_bool_pattern): Likewise.
	(vect_recog_mask_conversion_pattern): Likewise.
	(vect_try_gather_scatter_pattern): Likewise.
	(vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
	(vect_recog_over_widening_pattern): Likewise.
	(vect_recog_gather_scatter_pattern): Likewise.
	(vect_recog_func_ptr): Move from tree-vectorizer.h
	(vect_vect_recog_func_ptrs): Move further down the file.
	(vect_recog_func): Likewise.  Remove the third argument.
	(NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
	(vect_pattern_recog_1): Expect the pattern function to do any
	necessary target tests.  Also expect it to provide a vector type.
	Remove the type_in handling.

From-SVN: r261791
2018-06-20 08:16:08 +00:00
Richard Sandiford 49d8df1b95 [7/n] PR85694: Add a vect_pattern_detected helper
This message is a long write-up for a patch that simply adds a common
routine for printing the "vector_foo_pattern: detected:" messages.

The reason for doing this is that some routines check for target support
themselves and some leave it to vect_pattern_recog_1.  Those that leave
it to vect_pattern_recog_1 currently print these "detected:" messages if
the statements have the right form, even if the pattern is eventually
discarded.  IMO that's useful, and a lot of existing scan tests rely on it.

However, a later patch makes patterns do their own testing, and stops
them creating pattern statements until the tests have passed.  This means
(a) they need to print the "detected:" message earlier and (b) the pattern
statement won't be around to print.

The patch therefore makes all routines print the original statement
rather than the pattern one.  That information isn't obvious otherwise,
whereas vect_pattern_recog_1 already prints the pattern statement
in the case of a successful match.  This also avoids the previous
situation in which a routine could print "detected:" and then
silently bail out before saying what had been detected.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-patterns.c (vect_pattern_detected): New function.
	(vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
	(vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
	(vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
	(vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
	(vect_recog_mult_pattern, vect_recog_divmod_pattern)
	(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
	(vect_recog_mask_conversion_pattern)
	(vect_try_gather_scatter_pattern): Likewise.

From-SVN: r261790
2018-06-20 08:11:46 +00:00
Richard Sandiford 259273074e [6/n] PR85694: Add a vect_get_internal_def helper
This patch adds a helper for pattern code that wants to find an
internal (vectorisable) definition of an SSA name.

A later patch will make more use of this, and alter the definition.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-patterns.c (vect_get_internal_def): New function.
	(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
	(vect_recog_vector_vector_shift_pattern, check_bool_pattern)
	(search_type_for_mask_1): Use it.

From-SVN: r261789
2018-06-20 08:09:48 +00:00
Richard Sandiford 1f78617090 [5/n] PR85694: Remove dead WIDEN_SUM handling
vect_recog_dot_prod_pattern and vect_recog_sad_pattern both checked
whether the statement passed in had already been recognised as a
WIDEN_SUM_EXPR pattern.  That isn't possible (any more?), since the
first recognised pattern wins, and since vect_recog_widen_sum_pattern
never matches a later statement than the one it's given.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
	redundant WIDEN_SUM_EXPR handling.
	(vect_recog_sad_pattern): Likewise.

From-SVN: r261788
2018-06-20 08:08:21 +00:00
Richard Sandiford 44ae7a002c [4/n] PR85694: Remove redundant calls to types_compatible_p
tree-vect-patterns.c checked that operands to primitive arithmetic ops
are compatible with each other and with the result.  The checks date
back years and have long been redundant with verify_gimple_stmt.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
	redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
	(vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
	(vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
	(vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.

From-SVN: r261787
2018-06-20 08:07:37 +00:00
Richard Sandiford ed7b8123fa [3/n] PR85694: Fix dummy assignment handling in vectorizable_call
vectorizable_call stubs out the original scalar statement with
a dummy assignment to the same lhs, so that we don't leave any bogus
scalar calls around.  If the call is actually a pattern statement,
the code rightly took the lhs of the original bb statement:

  if (is_pattern_stmt_p (stmt_info))
    lhs = gimple_call_lhs (STMT_VINFO_RELATED_STMT (stmt_info));
  else
    lhs = gimple_call_lhs (stmt);

But it then associated the new statement with the stmt_vec_info of the
pattern statement rather than the bb statement, which meant we had two
stmt_vec_infos assigning to the same lhs.  This seems to be latent at
the moment but caused problems further into the series.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-stmts.c (vectorizable_call): Make sure that we
	use the stmt_vec_info of the original bb statement for the
	new zero assignment, even if the call is part of a pattern.

From-SVN: r261786
2018-06-20 08:06:33 +00:00
Richard Sandiford e3947d809d [2/n] PR85694: Attach a DEF_SEQ only to the original statement
A pattern's PATTERN_DEF_SEQ was attached to both the original statement
and the main pattern statement, which made it harder to update later.
This patch attaches it to just the original statement.  In practice,
anything that cared had ready access to both.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
	that the sequence is attached to the original statement rather
	than the pattern statement.
	* tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
	PATTERN_DEF_SEQ from the original statement rather than
	the main pattern statement.
	* tree-vect-stmts.c (free_stmt_vec_info): Likewise.
	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
	(vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.

From-SVN: r261785
2018-06-20 08:06:27 +00:00
Richard Sandiford d54a098e48 [1/n] PR85694: Allow pattern definition statements to be reused
This patch is the first part of a series to fix to PR85694.
Later patches can make the pattern for a statement S2 reuse the
results of a PATTERN_DEF_SEQ statement attached to an earlier
statement S1.  Although vect_mark_stmts_to_be_vectorized handled
this fine, vect_analyze_stmt and vect_transform_loop both skipped the
PATTERN_DEF_SEQ for S1 if S1's main pattern wasn't live or relevant.

I couldn't wrap my head around the flow in vect_transform_loop,
so ended up moving the per-statement handling into a subroutine.
That makes the patch look bigger than it actually is.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
	definition statements before the early exit for statements that aren't
	live or relevant.
	* tree-vect-loop.c (vect_transform_loop_stmt): New function,
	split out from...
	(vect_transform_loop): ...here.  Process pattern definition
	statements without first checking whether the main pattern
	statement is live or relevant.

From-SVN: r261784
2018-06-20 08:05:41 +00:00
GCC Administrator 036a90820a Daily bump.
From-SVN: r261779
2018-06-20 00:16:57 +00:00
David Edelsohn e56f46058f Wrap is_static with COLLECT_EXPORT_LIST
From-SVN: r261775
2018-06-19 18:42:37 -04:00
Martin Sebor b5ebb71777 PR middle-end/85602 - -Warray-bounds fails to detect the out of bound array access
gcc/testsuite/ChangeLog:
 	* c-c++-common/attr-nonstring-8.c: Adjust text of expected warning
 	to also match C++.

From-SVN: r261774
2018-06-19 16:35:45 -06:00
Eric Botcazou 180720a561 tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at -O0 if the locus represent UNKNOWN_LOCATION but have...
* tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
	-O0 if the locus represent UNKNOWN_LOCATION but have different values.

From-SVN: r261770
2018-06-19 21:31:44 +00:00
Aaron Sawdey f7e94dfb68 rs6000-string.c (select_block_compare_mode): Check TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>

	* config/rs6000/rs6000-string.c (select_block_compare_mode): Check
	TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
	(do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
	(expand_block_compare): Change select_block_compare_mode call.
	(expand_strncmp_align_check): Use new functions, fix comment.
	(emit_final_str_compare_gpr): New function.
	(expand_strn_compare): Refactor and clean up code.
	* config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.

From-SVN: r261769
2018-06-19 16:23:39 -05:00
Tony Reix 6a513e2a1b collect2.c (static_obj): New variable.
2018-06-19  Tony Reix  <tony.reix@atos.com>
            Damien Bergamini  <damien.bergamini@atos.com>
            David Edelsohn  <dje.gcc@gmail.com>

        * collect2.c (static_obj): New variable.
        (static_libs): New variable.
        (is_in_list): Uncomment declaration.
        (main): Track AIX libraries linked statically.
        (is_in_list): Uncomment definition.
        (scan_prog_file): Don't add AIX shared libraries initializer
        to constructor list if linking statically.

Co-Authored-By: Damien Bergamini <damien.bergamini@atos.com>
Co-Authored-By: David Edelsohn <dje.gcc@gmail.com>

From-SVN: r261759
2018-06-19 15:17:46 -04:00
Jason Merrill e8c487163a cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): Remove.
* cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): Remove.

	* constexpr.c: Use CONSTRUCTOR_NO_CLEARING instead.

From-SVN: r261758
2018-06-19 14:59:51 -04:00
Jason Merrill 0e570cf8b6 PR c++/86192 - ICE with anonymous union passed to template.
* pt.c (tsubst_expr) [DECL_EXPR]: Handle an anonymous union type
	used to declare a named variable.

From-SVN: r261757
2018-06-19 14:46:51 -04:00
Max Filippov 9a775e9df5 xtensa: fix PR target/65416
The issue is caused by reordering of stack pointer update after stack
space allocation with instructions that write to the allocated stack
space. In windowed ABI register spill area for the previous call frame
is located just below the stack pointer and may be reloaded back into
the register file on movsp.
Implement allocate_stack pattern for windowed ABI configuration and
insert an instruction that prevents reordering of frame memory access
and stack pointer update.

gcc/
2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>

	* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
	constant.
	(allocate_stack, frame_blockage, *frame_blockage): New patterns.

From-SVN: r261755
2018-06-19 18:26:07 +00:00
Martin Sebor 5f21ea6739 re PR middle-end/85602 (-Wsizeof-pointer-memaccess for strncat with size of source)
gcc/testsuite/ChangeLog:

	PR middle-end/85602
	* c-c++-common/attr-nonstring-8.c: Adjust text of expected warning
	to also match C++.

From-SVN: r261751
2018-06-19 11:30:47 -06:00
Jonathan Wakely 828d64499e Remove unused <exception> header from <utility>
This header was needed for the declaration of std::terminate but the
calls to it were removed in r242401.

	* include/std/utility: Remove unused <exception> header.

From-SVN: r261749
2018-06-19 18:19:16 +01:00
Jan Hubicka 694dc72ebe tree.c (find_decls_types_r): Remove all non-VAR_DECLs from blocks.
* tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
	blocks.
	* g++.dg/lto/pr84805_0.C: Update template.
	* g++.dg/lto/pr84805_1.C: Update template.

From-SVN: r261748
2018-06-19 15:56:27 +00:00
Joseph Myers 583d09f365 * es.po: Update.
From-SVN: r261745
2018-06-19 16:04:55 +01:00
Martin Liska 56f62793be Clean-up usage of ipa_fn_summary and ipa_call_summary summaries.
2018-06-19  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.c (ix86_can_inline_p): Do not use
        ipa_fn_summaries::get_create.
	* ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
        get.
	(devirtualization_time_bonus): Likewise.
	(ipcp_propagate_stage): Likewise.
	* ipa-fnsummary.c (redirect_to_unreachable): Likewise.
	(edge_set_predicate): Likewise.
	(evaluate_conditions_for_known_args): Likewise.
	(evaluate_properties_for_edge): Likewise.
	(ipa_call_summary::reset): Tranform to ...
	(ipa_call_summary::~ipa_call_summary): ... this.
	(ipa_fn_summary::reset): Transform to ...
	(ipa_fn_summary::~ipa_fn_summary): ... this.
	(ipa_fn_summary_t::remove): Rename to ...
	(ipa_fn_summary_t::remove_callees): ... this.
	(ipa_fn_summary_t::duplicate): Use placement new
        instead of memory copy.
	(ipa_call_summary_t::duplicate): Likewise.
	(ipa_call_summary_t::remove): Remove.
	(dump_ipa_call_summary): Change get_create to get.
	(ipa_dump_fn_summary): Dump only when summary exists.
	(analyze_function_body): Use symbol_summary::get instead
        of get_create.
	(compute_fn_summary): Likewise.
	(estimate_edge_devirt_benefit): Likewise.
	(estimate_edge_size_and_time): Likewise.
	(inline_update_callee_summaries): Likewise.
	(remap_edge_change_prob): Likewise.
	(remap_edge_summaries): Likewise.
	(ipa_merge_fn_summary_after_inlining): Likewise.
	(write_ipa_call_summary): Likewise.
	(ipa_fn_summary_write): Likewise.
	(ipa_free_fn_summary): Likewise.
	* ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
	(struct ipa_call_summary): Likewise.
	* ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
        of get_create.
	* ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
	(estimate_size_after_inlining): Likewise.
	(estimate_growth): Likewise.
	(growth_likely_positive): Likewise.
	* ipa-inline-transform.c (clone_inlined_nodes): Likewise.
	(inline_call): Likewise.
	* ipa-inline.c (caller_growth_limits): Likewise.
	(can_inline_edge_p): Likewise.
	(can_inline_edge_by_limits_p): Likewise.
	(compute_uninlined_call_time): Likewise.
	(compute_inlined_call_time): Likewise.
	(want_inline_small_function_p): Likewise.
	(edge_badness): Likewise.
	(update_caller_keys): Likewise.
	(update_callee_keys): Likewise.
	(inline_small_functions): Likewise.
	(inline_to_all_callers_1): Likewise.
	(dump_overall_stats): Likewise.
	(early_inline_small_functions): Likewise.
	(early_inliner): Likewise.
	* ipa-profile.c (ipa_propagate_frequency_1): Likewise.
	* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
	* ipa-pure-const.c (malloc_candidate_p): Likewise.
	* ipa-split.c (execute_split_functions): Likewise.
	* symbol-summary.h: Likewise.
	* tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2018-06-19  Martin Liska  <mliska@suse.cz>

	* lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
        of get_create.
	(undo_partition): Likewise.
	(lto_balanced_map): Likewise.

From-SVN: r261744
2018-06-19 14:31:20 +00:00
Martin Liska ed0eb0c55a Improve gimple.vim syntax file.
From-SVN: r261742
2018-06-19 12:46:26 +00:00
Martin Liska 58508d3f3a Add initial version of rtl.vim syntax file.
2018-06-19  Martin Liska  <mliska@suse.cz>

	* gcc-rtl.vim: New file.

From-SVN: r261741
2018-06-19 12:45:57 +00:00
Richard Biener 5b04d77ed5 tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2018-06-19  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
	(vectorize_loops): ... here.  Fix dbgcnt handling.
	(try_vectorize_loop): Wrap try_vectorize_loop_1.

From-SVN: r261740
2018-06-19 12:25:06 +00:00
Nick Clifton 8006534c79 Allow building of the zlib component when the building takes place in the source directory.
* zlib/configure.ac: Restore old behaviour of only enabling
	multilibs when a target subdirectory is defined.  This allows
	building with srcdir == builddir.
	* zlib/configure: Regenerate.

From-SVN: r261739
2018-06-19 11:49:08 +00:00
Segher Boessenkool 6b3a917093 rs6000: Fix vector homogeneous aggregates (PR86197)
The existing code allows only 4 vectors worth of ieee128 homogeneous
aggregates, but it should be 8.  This happens because at one spot it
is mistakenly qualified as being passed in floating point registers.


	PR target/86197
	* config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
	ieee128 argument takes up only one (vector) register, not two (floating
	point) registers.

From-SVN: r261738
2018-06-19 12:52:39 +02:00
Eric Botcazou 7f1387e0f2 gimplify.c (gimplify_init_constructor): Really never clear for an incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
* gimplify.c (gimplify_init_constructor): Really never clear for an
	incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.

From-SVN: r261735
2018-06-19 09:37:31 +00:00
Martin Liska 1724941ee1 Remove unused stagestuff in config-lang.in.
2018-06-19  Martin Liska  <mliska@suse.cz>

	* config-lang.in: Remove stagestuff.

From-SVN: r261733
2018-06-19 09:03:55 +00:00
Richard Biener df0aef6d7e re PR tree-optimization/86179 (ice in get_later_stmt, at tree-vectorizer.h:1108)
2018-06-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/86179
	* tree-vect-patterns.c (vect_pattern_recog_1): Clean up
	after failed recognition.

	* gcc.dg/pr86179.c: New testcase.

From-SVN: r261731
2018-06-19 06:53:04 +00:00
Jason Merrill 6bdfada421 tree.c (cp_expr_location): New.
* tree.c (cp_expr_location): New.

	* cp-tree.h (cp_expr_loc_or_loc): New.
	* call.c, cvt.c, constexpr.c, constraint.cc, cp-gimplify.c, decl.c,
	error.c, init.c, lex.c, parser.c, pt.c, semantics.c, typeck.c,
	typeck2.c: Use it instead of EXPR_LOC_OR_LOC.

From-SVN: r261728
2018-06-18 20:38:44 -04:00
Jason Merrill c0e11c6afb Use a range for LAMBDA_EXPR_LOCATION.
* parser.c (cp_parser_lambda_expression): Use a range for
	LAMBDA_EXPR_LOCATION.

From-SVN: r261727
2018-06-18 20:38:38 -04:00
Jason Merrill 44e3e545a3 PR c++/86200 - ICE with unexpanded pack in lambda parameter.
* pt.c (find_parameter_packs_r) [LAMBDA_EXPR]: Also look into the
	function type.

From-SVN: r261726
2018-06-18 20:38:32 -04:00
Jason Merrill cae39eb41f PR c++/81060 - ICE with unexpanded parameter pack.
* pt.c (check_for_bare_parameter_packs): Add loc parameter.
	* decl.c (grokdeclarator): Call it for qualifying_scope.

From-SVN: r261725
2018-06-18 20:38:26 -04:00
GCC Administrator 094c2a2373 Daily bump.
From-SVN: r261724
2018-06-19 00:16:40 +00:00