platform/upstream/gcc.git
5 years agors6000: Make offsettable_mem_operand use any_memory_operand
Segher Boessenkool [Sat, 20 Jul 2019 17:37:07 +0000 (19:37 +0200)]
rs6000: Make offsettable_mem_operand use any_memory_operand

* config/rs6000/predicates.md (offsettable_mem_operand): Allow volatile
memory.

From-SVN: r273633

5 years agors6000: Make input_operand use any_memory_operand
Segher Boessenkool [Sat, 20 Jul 2019 17:35:04 +0000 (19:35 +0200)]
rs6000: Make input_operand use any_memory_operand

* config/rs6000/predicates.md (input_operand): Allow volatile memory.

From-SVN: r273632

5 years agors6000: Make lwa_operand use any_memory_operand
Segher Boessenkool [Sat, 20 Jul 2019 17:34:06 +0000 (19:34 +0200)]
rs6000: Make lwa_operand use any_memory_operand

Testcase from comex, see https://lwn.net/Articles/793932/ .

* config/rs6000/predicates.md (lwa_operand): Allow volatile memory.

gcc/testsuite/
* gcc.target/powerpc/volatile-mem.c: New testcase.

From-SVN: r273631

5 years agors6000: New predicate any_memory_operand
Segher Boessenkool [Sat, 20 Jul 2019 17:28:37 +0000 (19:28 +0200)]
rs6000: New predicate any_memory_operand

The new predicate accepts both memory_operand and volatile_mem_operand.

* config/rs6000/predicates.md (volatile_mem_operand): Modernize syntax.
(any_memory_operand): New predicate.
(reg_or_mem_operand): Use it.

From-SVN: r273630

5 years agore PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3)
Jakub Jelinek [Sat, 20 Jul 2019 17:13:00 +0000 (19:13 +0200)]
re PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3)

PR target/91204
* optabs.c (expand_unop): As fallback, expand ~op0 as op0 ^ -1.

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

From-SVN: r273629

5 years agopa.h (hppa_profile_hook): Delete declaration.
John David Anglin [Sat, 20 Jul 2019 16:47:25 +0000 (16:47 +0000)]
pa.h (hppa_profile_hook): Delete declaration.

* config/pa/pa.h (hppa_profile_hook): Delete declaration.
* config/pa/pa-protos.h (hppa_profile_hook): Add declaration.

From-SVN: r273628

5 years agoFix ICE on class template argument deduction with inherited ctor.
Jason Merrill [Sat, 20 Jul 2019 14:43:49 +0000 (10:43 -0400)]
Fix ICE on class template argument deduction with inherited ctor.

In general, when we see a dependent using-declaration we don't know whether
it names a function or not, so it doesn't get an OVERLOAD unless we see
overloads of the same name in the current class.  In the case of an
inherited constructor we could figure that out from the name, but it's
simpler to handle USING_DECL properly.

* cp-tree.h (ovl_iterator::using_p): A USING_DECL by itself was also
introduced by a using-declaration.

From-SVN: r273623

5 years agoReduce memory consumption for push/pop_access_scope.
Jason Merrill [Sat, 20 Jul 2019 13:48:38 +0000 (09:48 -0400)]
Reduce memory consumption for push/pop_access_scope.

I was seeing memory consumption issues on the concepts-cxx2a
branch. push_scope was, surprisingly, at the top of -fmem-report, and
push_access_scope was pretty high.  Fixing them was pretty simple.

* name-lookup.c (leave_scope): Do add class levels other than
previous_class_level to free_binding_level.
(invalidate_class_lookup_cache): Move from class.c, add to
free_binding_level.
* pt.c (saved_access_scope): Change from list to vec.

From-SVN: r273622

5 years agotree.def (OMP_LOOP): New tree code.
Jakub Jelinek [Sat, 20 Jul 2019 11:21:42 +0000 (13:21 +0200)]
tree.def (OMP_LOOP): New tree code.

* tree.def (OMP_LOOP): New tree code.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_BIND.
(enum omp_clause_bind_kind): New enum.
(struct tree_omp_clause): Add subcode.bind_kind.
* tree.h (OMP_LOOP_CHECK): Rename to ...
(OMP_LOOPING_CHECK): ... this.
(OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND,
OMP_FOR_INCR, OMP_FOR_PRE_BODY, OMP_FOR_ORIG_DECLS): Use
OMP_LOOPING_CHECK instead of OMP_LOOP_CHECK.
(OMP_CLAUSE_BIND_KIND): Define.
* tree.c (omp_clause_num_ops, omp_clause_code_name): Add
bind clause entries.
(walk_tree_1): Handle OMP_CLAUSE_BIND.
* tree-pretty-print.c (dump_omp_clause): Likewise.
(dump_generic_node): Handle OMP_LOOP.
* gimplify.c (enum omp_region_type): Add ORT_IMPLICIT_TARGET.
(in_omp_construct): New variable.
(is_gimple_stmt): Handle OMP_LOOP.
(gimplify_scan_omp_clauses): For lastprivate don't set
check_non_private if code == OMP_LOOP.  For reduction clause
on OMP_LOOP combined with parallel or teams propagate as shared
on the combined construct.  Handle OMP_CLAUSE_BIND.
(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_BIND.
(gimplify_omp_for): Pass OMP_LOOP instead of OMP_{FOR,DISTRIBUTE}
for constructs from a loop construct to gimplify_scan_omp_clauses.
Don't predetermine iterator linear on OMP_SIMD from loop construct.
(replace_reduction_placeholders, gimplify_omp_loop): New functions.
(gimplify_omp_workshare): Use ORT_IMPLICIT_TARGET instead of trying
to match the implicit ORT_TARGET construct around whole body.
Temporarily clear in_omp_construct when processing body.
(gimplify_expr): Handle OMP_LOOP.  For OMP_MASTER, OMP_TASKGROUP
etc. temporarily set in_omp_construct when processing body.
(gimplify_body): Create ORT_IMPLICIT_TARGET instead of ORT_TARGET.
* omp-low.c (struct omp_context): Add loop_p.
(build_outer_var_ref): Treat ctx->loop_p similarly to simd construct
in that the original var might be private.
(scan_sharing_clauses): Handle OMP_CLAUSE_BIND.
(check_omp_nesting_restrictions): Adjust nesting restrictions for
addition of loop construct.
(scan_omp_1_stmt): Allow setjmp inside of loop construct.
gcc/c-family/
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
* c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
* c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
* c-omp.c (c_omp_split_clauses): Add support for 4 new combined
constructs with the loop construct.
gcc/c/
* c-parser.c (c_parser_omp_clause_name): Handle bind clause.
(c_parser_omp_clause_bind): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
(OMP_LOOP_CLAUSE_MASK): Define.
(c_parser_omp_loop): New function.
(c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
loop combined with parallel or teams.
(c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
gcc/cp/
* cp-tree.h (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOPING_CHECK
instead of OMP_LOOP_CHECK.
* parser.c (cp_parser_omp_clause_name): Handle bind clause.
(cp_parser_omp_clause_bind): New function.
(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
(OMP_LOOP_CLAUSE_MASK): Define.
(cp_parser_omp_loop): New function.
(cp_parser_omp_parallel, cp_parser_omp_teams): Handle parsing of
loop combined with parallel or teams.
(cp_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
(cp_parser_pragma): Likewise.
* pt.c (tsubst_expr): Handle OMP_LOOP.
* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_BIND.
gcc/testsuite/
* c-c++-common/gomp/cancel-1.c: Adjust expected diagnostic wording.
* c-c++-common/gomp/clauses-1.c (foo, baz, bar): Add order(concurrent)
clause where allowed.  Add combined constructs with loop with all
possible clauses.
(qux): New function.
* c-c++-common/gomp/loop-1.c: New test.
* c-c++-common/gomp/loop-2.c: New test.
* c-c++-common/gomp/loop-3.c: New test.
* c-c++-common/gomp/loop-4.c: New test.
* c-c++-common/gomp/loop-5.c: New test.
* c-c++-common/gomp/order-3.c: Adjust expected diagnostic wording.
* c-c++-common/gomp/simd-setjmp-1.c: New test.
* c-c++-common/gomp/teams-2.c: Adjust expected diagnostic wording.
libgomp/
* testsuite/libgomp.c-c++-common/loop-1.c: New test.

From-SVN: r273621

5 years agoomp-low.c (lower_rec_input_clauses): Don't force simd arrays for lastprivate non...
Jakub Jelinek [Sat, 20 Jul 2019 06:38:59 +0000 (08:38 +0200)]
omp-low.c (lower_rec_input_clauses): Don't force simd arrays for lastprivate non-addressable iterator of a...

* omp-low.c (lower_rec_input_clauses): Don't force simd arrays for
lastprivate non-addressable iterator of a collapse(1) simd.

* gcc.dg/vect/vect-simd-16.c: New test.

From-SVN: r273620

5 years agoDaily bump.
GCC Administrator [Sat, 20 Jul 2019 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273615

5 years agocompiler: don't export bodies for functions marked "go:noinline"
Ian Lance Taylor [Fri, 19 Jul 2019 23:10:55 +0000 (23:10 +0000)]
compiler: don't export bodies for functions marked "go:noinline"

    The current Mark_inline_candidates helper looks only at budget when
    deciding to mark a function or method as inline (with the proviso that
    IR constructs not yet supported by the inliner are given artificially
    high cost). This patch changes the helper to also look at whether a
    function has the "go:noinline" pragma; if it does have the pragma
    there is no point putting it into the export data (it will just make
    the export data bigger).

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186923

From-SVN: r273611

5 years agors6000-call.c (HAVE_AS_GNU_ATTRIBUTE): define value as in rs6000.c.
Bill Seurer [Fri, 19 Jul 2019 22:14:56 +0000 (22:14 +0000)]
rs6000-call.c (HAVE_AS_GNU_ATTRIBUTE): define value as in rs6000.c.

2019-07-17  Bill Seurer  <seurer@linux.vnet.ibm.com>

* config/rs6000/rs6000-call.c (HAVE_AS_GNU_ATTRIBUTE): define value
as in rs6000.c.

From-SVN: r273610

5 years agostl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size...
François Dumont [Fri, 19 Jul 2019 21:14:41 +0000 (21:14 +0000)]
stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation.

2019-07-19  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
sized deallocation size computation.

From-SVN: r273609

5 years ago[Darwin] More specs TLC.
Iain Sandoe [Fri, 19 Jul 2019 20:10:33 +0000 (20:10 +0000)]
[Darwin] More specs TLC.

This strips out a few driver specs that are only specifying a default state.
Also warn on an option now ignored, and add some comments to the driver specs
section.

2019-07-19  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.h (DRIVER_SELF_SPECS): Ignore X and Mach specs which
refer to default conditions.  Warn for the 'y' spec which is ignored
by current linkers.

From-SVN: r273608

5 years ago[PATCH, rs6000] Split up rs6000.c.
Bill Seurer [Fri, 19 Jul 2019 18:33:59 +0000 (18:33 +0000)]
[PATCH, rs6000] Split up rs6000.c.

The source file rs6000.c has grown to unreasonable size and is being
split up into several smaller source files.  This should improve
compilation speed for building gcc.

This is the second of several patches to do this and moves most of the
function call and builtin code to a new source file.

Bootstrapped and tested on powerpc64le-unknown-linux-gnu and
powerpc64-unknown-linux-gnu with no regressions.  Is this ok for trunk?

2019-07-17  Bill Seurer  <seurer@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (builtin_description, cpu_is_info,
cpu_supports_info, builtin_hash_struct, builtin_hasher,
builtin_hash_table, rs6000_builtin_info_type, rs6000_builtin_info,
rs6000_aggregate_candidate, rs6000_discover_homogeneous_aggregate,
rs6000_return_in_memory, rs6000_return_in_msb, call_ABI_of_interest,
init_cumulative_args, rs6000_promote_function_mode,
rs6000_must_pass_in_stack, is_complex_IBM_long_double,
abi_v4_pass_in_fpr, rs6000_function_arg_padding,
rs6000_function_arg_boundary, rs6000_parm_offset,
rs6000_parm_start, rs6000_arg_size,
rs6000_darwin64_record_arg_advance_flush,
rs6000_darwin64_record_arg_advance_recurse,
rs6000_darwin64_struct_check_p, rs6000_function_arg_advance_1,
rs6000_function_arg_advance, rs6000_darwin64_record_arg_flush,
rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
rs6000_mixed_function_arg, rs6000_psave_function_arg,
rs6000_finish_function_arg, rs6000_function_arg,
rs6000_arg_partial_bytes, rs6000_pass_by_reference,
rs6000_parm_needs_stack, rs6000_function_parms_need_stack,
rs6000_reg_parm_stack_space, rs6000_move_block_from_reg,
setup_incoming_varargs, rs6000_build_builtin_va_list, rs6000_va_start,
rs6000_gimplify_va_arg, def_builtin, bdesc_3arg, bdesc_dst,
bdesc_2arg, bdesc_altivec_preds, bdesc_abs, bdesc_1arg, bdesc_0arg,
bdesc_htm, rs6000_overloaded_builtin_p, rs6000_overloaded_builtin_name,
rs6000_expand_zeroop_builtin, rs6000_expand_mtfsf_builtin,
rs6000_expand_mtfsb_builtin, rs6000_expand_set_fpscr_rn_builtin,
rs6000_expand_set_fpscr_drn_builtin, rs6000_expand_unop_builtin,
altivec_expand_abs_builtin, rs6000_expand_binop_builtin,
altivec_expand_predicate_builtin, swap_endian_selector_for_mode,
altivec_expand_lv_builtin, altivec_expand_stxvl_builtin,
altivec_expand_stv_builtin, htm_spr_num, rs6000_htm_spr_icode,
htm_expand_builtin, cpu_expand_builtin, rs6000_expand_ternop_builtin,
altivec_expand_dst_builtin, altivec_expand_vec_init_builtin,
get_element_number, altivec_expand_vec_set_builtin,
altivec_expand_vec_ext_builtin, altivec_expand_builtin,
rs6000_builtin_is_supported_p, rs6000_invalid_builtin,
rs6000_fold_builtin, rs6000_builtin_valid_without_lhs,
fold_build_vec_cmp, fold_compare_helper, fold_mergehl_helper,
fold_mergeeo_helper, rs6000_gimple_fold_builtin,
rs6000_expand_builtin, rs6000_vector_type,
rs6000_init_builtins, rs6000_builtin_decl, altivec_init_builtins,
htm_init_builtins, builtin_function_type, rs6000_common_init_builtins,
rs6000_internal_arg_pointer, rs6000_output_mi_thunk): Move
to rs6000-call.c.
* config/rs6000/rs6000-call.c (builtin_description, cpu_is_info,
cpu_supports_info, builtin_hash_struct, builtin_hasher,
builtin_hash_table, rs6000_builtin_info_type, rs6000_builtin_info,
rs6000_aggregate_candidate, rs6000_discover_homogeneous_aggregate,
rs6000_return_in_memory, rs6000_return_in_msb, call_ABI_of_interest,
init_cumulative_args, rs6000_promote_function_mode,
rs6000_must_pass_in_stack, is_complex_IBM_long_double,
abi_v4_pass_in_fpr, rs6000_function_arg_padding,
rs6000_function_arg_boundary, rs6000_parm_offset,
rs6000_parm_start, rs6000_arg_size,
rs6000_darwin64_record_arg_advance_flush,
rs6000_darwin64_record_arg_advance_recurse,
rs6000_darwin64_struct_check_p, rs6000_function_arg_advance_1,
rs6000_function_arg_advance, rs6000_darwin64_record_arg_flush,
rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
rs6000_mixed_function_arg, rs6000_psave_function_arg,
rs6000_finish_function_arg, rs6000_function_arg,
rs6000_arg_partial_bytes, rs6000_pass_by_reference,
rs6000_parm_needs_stack, rs6000_function_parms_need_stack,
rs6000_reg_parm_stack_space, rs6000_move_block_from_reg,
setup_incoming_varargs, rs6000_build_builtin_va_list, rs6000_va_start,
rs6000_gimplify_va_arg, def_builtin, bdesc_3arg, bdesc_dst,
bdesc_2arg, bdesc_altivec_preds, bdesc_abs, bdesc_1arg, bdesc_0arg,
bdesc_htm, rs6000_overloaded_builtin_p, rs6000_overloaded_builtin_name,
rs6000_expand_zeroop_builtin, rs6000_expand_mtfsf_builtin,
rs6000_expand_mtfsb_builtin, rs6000_expand_set_fpscr_rn_builtin,
rs6000_expand_set_fpscr_drn_builtin, rs6000_expand_unop_builtin,
altivec_expand_abs_builtin, rs6000_expand_binop_builtin,
altivec_expand_predicate_builtin, swap_endian_selector_for_mode,
altivec_expand_lv_builtin, altivec_expand_stxvl_builtin,
altivec_expand_stv_builtin, htm_spr_num, rs6000_htm_spr_icode,
htm_expand_builtin, cpu_expand_builtin, rs6000_expand_ternop_builtin,
altivec_expand_dst_builtin, altivec_expand_vec_init_builtin,
get_element_number, altivec_expand_vec_set_builtin,
altivec_expand_vec_ext_builtin, altivec_expand_builtin,
rs6000_builtin_is_supported_p, rs6000_invalid_builtin,
rs6000_fold_builtin, rs6000_builtin_valid_without_lhs,
fold_build_vec_cmp, fold_compare_helper, fold_mergehl_helper,
fold_mergeeo_helper, rs6000_gimple_fold_builtin,
rs6000_expand_builtin, rs6000_vector_type,
rs6000_init_builtins, rs6000_builtin_decl, altivec_init_builtins,
htm_init_builtins, builtin_function_type, rs6000_common_init_builtins,
rs6000_internal_arg_pointer, rs6000_output_mi_thunk: Move
to here from rs6000.c.
* config/rs6000/rs6000-internal.h: (rs6000_darwin64_struct_check_p,
rs6000_discover_homogeneous_aggregate, rs6000_output_mi_thunk,
rs6000_output_addr_const_extra, rs6000_gimple_fold_builtin,
rs6000_invalid_builtin, rs6000_build_builtin_va_list, rs6000_va_start,
rs6000_gimplify_va_arg, rs6000_promote_function_mode,
rs6000_return_in_memory, rs6000_return_in_msb,
rs6000_pass_by_reference, setup_incoming_varargs,
rs6000_function_arg_boundary, rs6000_must_pass_in_stack,
rs6000_arg_partial_bytes, rs6000_function_arg_advance,
rs6000_function_arg_padding, rs6000_function_arg,
rs6000_darwin64_record_arg, rs6000_internal_arg_pointer,
rs6000_init_builtins, rs6000_builtin_decl, rs6000_expand_builtin,
rs6000_fold_builtin, rs6000_passes_ieee128, rs6000_passes_float,
rs6000_passes_long_double, rs6000_passes_vector,
rs6000_returns_struct, cpu_builtin_p, tree builtin_mode_to_type,
altivec_builtin_mask_for_load) Add declarations.
* config/rs6000/t-rs6000: Add new source file rs6000-call.c.
* config/config.gcc: Add new source file rs6000-call.c to garbage
collector and extra_objs.

From-SVN: r273607

5 years agotree-ssa-dse.c (initialize_ao_ref_for_dse): Handle strncpy.
Jeff Law [Fri, 19 Jul 2019 17:04:51 +0000 (11:04 -0600)]
tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle strncpy.

* tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle
strncpy.  Drop some trivial dead code.
(maybe_trim_memstar_call): Handle strncpy.

* gcc.dg/tree-ssa/ssa-dse-37.c: New test.
* gcc.dg/tree-ssa/ssa-dse-38.c: New test.

From-SVN: r273606

5 years agore PR tree-optimization/91211 (wrong code with __builtin_memset() and __builtin_memcp...
Richard Biener [Fri, 19 Jul 2019 16:19:39 +0000 (16:19 +0000)]
re PR tree-optimization/91211 (wrong code with __builtin_memset() and __builtin_memcpy() at -O1 and above)

2019-07-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91211
* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Fix
memset encoding size.

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

From-SVN: r273605

5 years agore PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3)
Uros Bizjak [Fri, 19 Jul 2019 14:36:49 +0000 (16:36 +0200)]
re PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3)

PR target/91204
* config/i386/mmx.md (one_cmpl<mode>2): New expander.

From-SVN: r273604

5 years agore PR ipa/91194 (A suspicious condition in recursive_inlining)
Jan Hubicka [Fri, 19 Jul 2019 14:31:09 +0000 (16:31 +0200)]
re PR ipa/91194 (A suspicious condition in recursive_inlining)

PR ipa/91194
* ipa-inline.c (recursive_inlining): Fix limits check.

From-SVN: r273603

5 years agore PR tree-optimization/91200 (ICE on valid code at -O1: verify_ssa failed)
Richard Biener [Fri, 19 Jul 2019 12:24:53 +0000 (12:24 +0000)]
re PR tree-optimization/91200 (ICE on valid code at -O1: verify_ssa failed)

2019-07-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91200
* tree-ssa-phiopt.c (cond_store_replacement): Check we have
no PHI nodes in middle-bb.

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

From-SVN: r273602

5 years ago[AArch64] Rename +bitperm to +sve2-bitperm
Richard Sandiford [Fri, 19 Jul 2019 11:24:31 +0000 (11:24 +0000)]
[AArch64] Rename +bitperm to +sve2-bitperm

After some discussion, we've decided to rename the +bitperm feature
flag to +sve2-bitperm, so that it's consistent with the other SVE2
feature flags.  The associated macro was already
__ARM_FEATURE_SVE2_BITPERM, so only the feature flag itself
needs to change.

2019-07-19  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* doc/invoke.texi: Rename the AArch64 +bitperm extension flag
to +sve-bitperm.
* config/aarch64/aarch64-option-extensions.def: Likewise.

From-SVN: r273600

5 years agore PR middle-end/91190 (ICE on valid code: in hashtab_chk_error, at hash-table.c...
Jakub Jelinek [Fri, 19 Jul 2019 10:26:23 +0000 (12:26 +0200)]
re PR middle-end/91190 (ICE on valid code: in hashtab_chk_error, at hash-table.c:137)

PR middle-end/91190
* function.c (insert_temp_slot_address): Store into the hash table
a copy of address to avoid RTL sharing issues.

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

From-SVN: r273599

5 years ago* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
Andreas Schwab [Fri, 19 Jul 2019 09:57:08 +0000 (09:57 +0000)]
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r273598

5 years agore PR tree-optimization/91207 (Wrong code with -O3)
Richard Biener [Fri, 19 Jul 2019 08:47:41 +0000 (08:47 +0000)]
re PR tree-optimization/91207 (Wrong code with -O3)

2019-07-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91207
Revert
2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-vect-stmts.c (get_group_load_store_type): For SLP
loads with a gap larger than the vector size always use
VMAT_STRIDED_SLP.
(vectorizable_load): For VMAT_STRIDED_SLP with a permutation
avoid loading vectors that are only contained in the gap
and thus are not needed.

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

From-SVN: r273593

5 years agoPR c++/90101 - dependent class non-type parameter.
Jason Merrill [Fri, 19 Jul 2019 07:29:15 +0000 (03:29 -0400)]
PR c++/90101 - dependent class non-type parameter.

We shouldn't complain that a dependent type is incomplete.

* pt.c (invalid_nontype_parm_type_p): Check for dependent class type.

From-SVN: r273592

5 years agoPR c++/90098 - partial specialization and class non-type parms.
Jason Merrill [Fri, 19 Jul 2019 06:52:47 +0000 (02:52 -0400)]
PR c++/90098 - partial specialization and class non-type parms.

A non-type template parameter of class type used in an expression has
const-qualified type; the pt.c hunks deal with this difference from the
unqualified type of the parameter declaration.  WAhen we use such a
parameter as an argument to another template, we don't want to confuse
things by copying it, we should pass it straight through.  And we might as
well skip copying other classes in constant evaluation context in a
template, too; we'll get the copy semantics at instantiation time.

PR c++/90099
PR c++/90101
* call.c (build_converted_constant_expr_internal): Don't copy.
* pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR
around class non-type parameter.
(unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals.

From-SVN: r273591

5 years agoDaily bump.
GCC Administrator [Fri, 19 Jul 2019 00:16:26 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273590

5 years agostl_tempbuf.h (__detail::__return_temporary_buffer): New.
François Dumont [Thu, 18 Jul 2019 21:52:35 +0000 (21:52 +0000)]
stl_tempbuf.h (__detail::__return_temporary_buffer): New.

2019-07-18  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
(~_Temporary_buffer()): Use latter.
(_Temporary_buffer(_FIterator, size_type)): Likewise.

From-SVN: r273586

5 years agoi386.md (*addqi_2_slp): Remove.
Uros Bizjak [Thu, 18 Jul 2019 19:59:55 +0000 (21:59 +0200)]
i386.md (*addqi_2_slp): Remove.

* config/i386/i386.md (*addqi_2_slp): Remove.
(*<code>qi_2_slp): Ditto.

From-SVN: r273583

5 years agoRename function.
Michael Meissner [Thu, 18 Jul 2019 19:07:13 +0000 (19:07 +0000)]
Rename function.

2019-07-18  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/predicates.md (prefixed_mem_operand): Call
rs6000_prefixed_address_mode_p instead of rs6000_prefixed_address.
* config/rs6000/rs6000-protos.h (rs6000_prefixed_address_mode_p):
Rename function from rs6000_prefixed_address.
* config/rs6000/rs6000.c (rs6000_prefixed_address_mode_p): Rename
function from rs6000_prefixed_address.

From-SVN: r273580

5 years agoUpdate PowerPC compiler for pc-relative support.
Michael Meissner [Thu, 18 Jul 2019 18:16:43 +0000 (18:16 +0000)]
Update PowerPC compiler for pc-relative support.

2019-07-18  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/aix.h (TARGET_HAS_TOC): Rename TARGET_TOC to
TARGET_HAS_TOC.
(TARGET_TOC): Likewise.
(TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in
rs6000.h.
* config/rs6000/darwin.h (TARGET_HAS_TOC): Rename TARGET_TOC to
TARGET_HAS_TOC.
(TARGET_TOC): Likewise.
(TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in
rs6000.h.
* config/rs6000/linux64.h (TARGET_HAS_TOC): Rename TARGET_TOC to
TARGET_HAS_TOC.
(TARGET_TOC): Likewise.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Add
check to require -mcmodel=medium for pc-relative addressing.
(create_TOC_reference): Add assertion for TARGET_TOC.
(rs6000_legitimize_address): Use TARGET_NO_TOC_OR_PCREL instead of
TARGET_NO_TOC.
(rs6000_emit_move): Likewise.
(TOC_alias_set): Rename TOC alias set static variable from 'set'
to 'TOC_alias_set'.
(get_TOC_alias_set): Likewise.
(output_toc): Use TARGET_NO_TOC_OR_PCREL instead of
TARGET_NO_TOC.
(rs6000_can_eliminate): Likewise.
* config/rs6000/rs6000.h (TARGET_TOC): Define in terms of
TARGET_HAS_TOC and not pc-relative.
(TARGET_NO_TOC_OR_PCREL): New macro to replace TARGET_NO_TOC.
* config/rs6000/sysv4.h (TARGET_HAS_TOC): Rename TARGET_TOC to
TARGET_HAS_TOC.
(TARGET_TOC): Likewise.
(TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in
rs6000.h.

From-SVN: r273579

5 years agore PR target/91188 (strict_low_part operations do not work)
Uros Bizjak [Thu, 18 Jul 2019 17:17:31 +0000 (19:17 +0200)]
re PR target/91188 (strict_low_part operations do not work)

PR target/91188
* config/i386/i386.md (*addqi_1_slp): Use register_operand predicate
for operand 0.  Do not use (match_dup) to match operand 1 with
operand 0.  Add check in insn constraint that either input operand
matches operand 0.  Use SWI12 mode iterator to also handle
HImode operands.
(*and<mode>_1_slp): Ditto.
(*<code>qi_1_slp): Ditto.
(*sub<mode>_1_slp): Use register_operand predicate for operand 0.
Do not use (match_dup) to match operand 1 with operand 0.  Add
check in insn constraint that operand 1 matches operand 0.
Use SWI12 mode iterator to also handle HImode operands.
(*ashl<mode>3_1_slp): Ditto.
(*<shift_insn><mode>3_1_slp): Ditto.
(*<rotate_insn><mode>3_1_slp): Ditto.

testsuite/ChangeLog:

PR target/91188
* gcc.target/i386/pr91188-1a.c: New test.
* gcc.target/i386/pr91188-1b.c: Ditto.
* gcc.target/i386/pr91188-1c.c: Ditto.
* gcc.target/i386/pr91188-2a.c: Ditto.
* gcc.target/i386/pr91188-2b.c: Ditto.
* gcc.target/i386/pr91188-2c.c: Ditto.

From-SVN: r273578

5 years agocompiler: fix bug in importing blocks from inline functions
Ian Lance Taylor [Thu, 18 Jul 2019 16:51:00 +0000 (16:51 +0000)]
compiler: fix bug in importing blocks from inline functions

    This patch fixes a buglet in the function body importer. Add hooks for
    keeping a stack of blocks corresponding to the block nesting in the
    imported function. This ensures that local variables and temps wind up
    correctly scoped and don't introduce collisions.

    New test case for this problem in CL 186717.

    Fixes golang/go#33158.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186757

From-SVN: r273577

5 years agoMakefile.rtl, [...]: Introduce a "STANDALONE" mode where C runtime files do not have...
Arnaud Charlet [Thu, 18 Jul 2019 16:37:40 +0000 (16:37 +0000)]
Makefile.rtl, [...]: Introduce a "STANDALONE" mode where C runtime files do not have any dependency...

* Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
runtime files do not have any dependency on GCC include files.
Remove unnecessary includes.
Remove remaining references to VMS in runtime C file.
* runtime.h: new File.

From-SVN: r273576

5 years ago[patch2/2][arm]: remove builtin expand for sha1
Sylvia Taylor [Thu, 18 Jul 2019 16:02:05 +0000 (16:02 +0000)]
[patch2/2][arm]: remove builtin expand for sha1

This patch removes the builtin expand handling for sha1h/c/m/p and
replaces it with expand patterns. This should make it more consistent
with how we handle intrinsic implementations and cleans up the custom
sha1 code in the arm_expand builtins for unop and ternop.

2019-07-18  Sylvia Taylor  <sylvia.taylor@arm.com>

* config/arm/arm-builtins.c
(arm_expand_ternop_builtin): Remove explicit sha1 builtin handling.
(arm_expand_unop_builtin): Likewise.
* config/arm/crypto.md
(crypto_sha1h): Convert from define_insn to define_expand.
(crypto_<crypto_pattern>): Likewise.
(crypto_sha1h_lb): New define_insn.
(crypto_<crypto_pattern>_lb): Likewise.

From-SVN: r273575

5 years ago[patch1/2][arm][PR90317]: fix sha1 patterns
Sylvia Taylor [Thu, 18 Jul 2019 15:42:13 +0000 (15:42 +0000)]
[patch1/2][arm][PR90317]: fix sha1 patterns

This patch fixes:

1) Ice message thrown when using the crypto_sha1h intrinsic due to
incompatible mode used for zero_extend. Removed zero extend as it is
not a good choice for vector modes and using an equivalent single
mode like TI (128bits) instead of V4SI produces extra instructions
making it inefficient.

This affects gcc version 8 and above.

2) Incorrect combine optimizations made due to vec_select usage
in the sha1 patterns on arm. The patterns should only combine
a vec select within a sha1h<op> instruction when the lane is 0.

This affects gcc version 5 and above.

- Fixed by explicitly declaring the valid const int for such
optimizations. For cases when the lane is not 0, the vector
lane selection now occurs in a e.g. vmov instruction prior
to sha1h<op>.

- Updated the sha1h testcases on arm to check for additional
cases with custom vector lane selection.

The intrinsic functions for the sha1 patterns have also been
simplified which seems to eliminate extra vmovs like:
- vmov.i32 q8, #0.

2019-07-18  Sylvia Taylor  <sylvia.taylor@arm.com>

        PR target/90317
        * config/arm/arm_neon.h
        (vsha1h_u32): Refactor.
        (vsha1cq_u32): Likewise.
        (vsha1pq_u32): Likewise.
        (vsha1mq_u32): Likewise.
        * config/arm/crypto.md:
        (crypto_sha1h): Remove zero extend, correct vec select.
        (crypto_sha1c): Correct vec select.
        (crypto_sha1m): Likewise.
        (crypto_sha1p): Likewise.

        * gcc.target/arm/crypto-vsha1cq_u32.c (foo): Change return type to
        uint32_t.
        (GET_LANE, TEST_SHA1C_VEC_SELECT): New.
        * gcc.target/arm/crypto-vsha1h_u32.c (foo): Change return type to
        uint32_t.
        (GET_LANE, TEST_SHA1H_VEC_SELECT): New.
        * gcc.target/arm/crypto-vsha1mq_u32.c (foo): Change return type to
        uint32_t.
        (GET_LANE, TEST_SHA1M_VEC_SELECT): New.
        * gcc.target/arm/crypto-vsha1pq_u32.c (foo): Change return type to
        uint32_t.
        (GET_LANE, TEST_SHA1P_VEC_SELECT): New.

From-SVN: r273574

5 years agodemangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h.
Eduard-Mihai Burtescu [Thu, 18 Jul 2019 14:10:51 +0000 (16:10 +0200)]
demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h.

include/
* demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h.
(rust_demangle_sym): Move to libiberty/rust-demangle.h.
libiberty/
* cplus-dem.c: Include rust-demangle.h.
* rust-demangle.c: Include rust-demangle.h.
* rust-demangle.h: New file.

From-SVN: r273573

5 years ago[arm] Fix incorrect modes with 'borrow' operations
Richard Earnshaw [Thu, 18 Jul 2019 13:56:52 +0000 (13:56 +0000)]
[arm] Fix incorrect modes with 'borrow' operations

Looking through the arm backend I noticed that the modes used to pass
comparison types into subtract-with-carry operations were being
incorrectly set.  The result is that the compiler is not truly
self-consistent.  To clean this up I've introduced a new predicate,
arm_borrow_operation (borrowed from the AArch64 backend) which can
match the comparison type with the required mode and then fixed all
the patterns to use this.  The split patterns that were generating
incorrect modes have all obviously been fixed as well.

The basic rule for the use of a borrow is:
- if the condition code was set by a 'subtract-like' operation (subs, cmp),
  then use CCmode and LTU.
- if the condition code was by unsigned overflow of addition (adds), then
  use CC_Cmode and GEU.

* config/arm/predicates.md (arm_borrow_operation): New predicate.
* config/arm/arm.c (subdi3_compare1): Use CCmode for the split.
(arm_subdi3, subdi_di_zesidi, subdi_di_sesidi): Likewise.
(subdi_zesidi_zesidi): Likewise.
(negdi2_compare, negdi2_insn): Likewise.
(negdi_extensidi): Likewise.
(negdi_zero_extendsidi): Likewise.
(arm_cmpdi_insn): Likewise.
(subsi3_carryin): Use arm_borrow_operation.
(subsi3_carryin_const): Likewise.
(subsi3_carryin_const0): Likewise.
(subsi3_carryin_compare): Likewise.
(subsi3_carryin_compare_const): Likewise.
(subsi3_carryin_compare_const0): Likewise.
(subsi3_carryin_shift): Likewise.
(rsbsi3_carryin_shift): Likewise.
(negsi2_carryin_compare): Likewise.

From-SVN: r273572

5 years agolto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR conflicts...
Jan Hubicka [Thu, 18 Jul 2019 13:08:34 +0000 (15:08 +0200)]
lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR conflicts of types in anonymous namespaces.

* lto-common.c (gimple_register_canonical_type_1): Do not look for
non-ODR conflicts of types in anonymous namespaces.
(unify_scc): Do not merge anonymous namespace types.
* g++.dg/lto/alias-5_0.C: New testcase.
* g++.dg/lto/alias-5_1.C: New.
* g++.dg/lto/alias-5_2.c: New.

From-SVN: r273571

5 years agore PR tree-optimization/91137 (Wrong code with -O3)
Bin Cheng [Thu, 18 Jul 2019 08:38:09 +0000 (08:38 +0000)]
re PR tree-optimization/91137 (Wrong code with -O3)

        PR tree-optimization/91137
        * tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
        (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
        Init, use and fini the above new field.
        (determine_base_object_1): New function.
        (determine_base_object): Reimplement using walk_tree.

gcc/testsuite
        PR tree-optimization/91137
        * gcc.c-torture/execute/pr91137.c: New test.

From-SVN: r273570

5 years agoMake ifcvt clean up dead comparisons
Richard Sandiford [Thu, 18 Jul 2019 08:24:16 +0000 (08:24 +0000)]
Make ifcvt clean up dead comparisons

This change is needed to avoid a regression in gcc.dg/ifcvt-3.c
for a later patch.  Without it, we enter CSE with a dead comparison left
by if-conversion and then eliminate the second (live) comparison in
favour of the dead one.  That's functionally correct in itself, but it
meant that we'd combine the subtraction and comparison into a SUBS
before we have a chance to fold away the subtraction.

2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* basic-block.h (CLEANUP_FORCE_FAST_DCE): New macro.
* cfgcleanup.c (cleanup_cfg): Call run_fast_dce if
CLEANUP_FORCE_FAST_DCE is set.
* ifcvt.c (rest_of_handle_if_conversion): Pass
CLEANUP_FORCE_FAST_DCE to the final cleanup_cfg call if
if-conversion succeeded.

From-SVN: r273569

5 years agoFix -Wreturn-type for static naked functions in C
Richard Sandiford [Thu, 18 Jul 2019 08:22:50 +0000 (08:22 +0000)]
Fix -Wreturn-type for static naked functions in C

This patch extends the fix for PR53633 to include static functions,
which were giving a bogus -Wreturn-type warning for C but not for C++.

2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/c/
PR c/53633
* c-decl.c (finish_function): Check targetm.warn_func_return
before issuing a -Wreturn-type warning.

gcc/testsuite/
* c-c++-common/pr53633-2.c: New test.

From-SVN: r273568

5 years agotree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor branches to make code...
Richard Biener [Thu, 18 Jul 2019 08:09:16 +0000 (08:09 +0000)]
tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor branches to make code less indented.

2019-07-18  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor
branches to make code less indented.

From-SVN: r273567

5 years agocompiler: fix bug in handling of unordered set during exporting
Ian Lance Taylor [Thu, 18 Jul 2019 05:05:20 +0000 (05:05 +0000)]
compiler: fix bug in handling of unordered set during exporting

    In CL 183850 a change was made to combine tracking/discovery of
    exported types and imported packages during export data generation. As
    a result of this refactoring a bug was introduced: the new code can
    potentially insert items into the exports set (an unordered_set) while
    iterating through the same set, which is illegal according to the spec
    for std::unordered_set.

    This patch fixes the problem by changing the type discovery phase to
    iterate through a separate list of sorted exports, as opposed to
    iterating through the main unordered set.  Also included is a change
    to fix the code that looks for variables that are referenced from
    inlined routine bodies (this code wasn't scanning all of the function
    that it needed to scan).

    New test case for this problem in CL 186697.

    Updates golang/go#33020.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185977

From-SVN: r273564

5 years ago-Wmissing-attributes: check that we avoid duplicates and false positives
Alexandre Oliva [Thu, 18 Jul 2019 00:38:45 +0000 (00:38 +0000)]
-Wmissing-attributes: check that we avoid duplicates and false positives

The initial patch for PR 81824 fixed various possibilities of
-Wmissing-attributes reporting duplicates and false positives.  The
test that avoided them was a little obscure, though, so this patch
rewrites it into a more self-evident form.

The patch also adds a testcase that already passed, but that
explicitly covers some of the possibilities of reporting duplicates
and false positives that preexisting tests did not cover.

for  gcc/ChangeLog

PR middle-end/81824
* attribs.c (decls_mismatched_attributes): Simplify the logic
that avoids duplicates and false positives.

for  gcc/testsuite/ChangeLog

PR middle-end/81824
* g++.dg/Wmissing-attributes-1.C: New.  Some of its fragments
are from Martin Sebor.

From-SVN: r273563

5 years agoDaily bump.
GCC Administrator [Thu, 18 Jul 2019 00:16:38 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273562

5 years agopa.c (pa_som_asm_init_sections): Don't force all constant data into data section...
John David Anglin [Thu, 18 Jul 2019 00:06:41 +0000 (00:06 +0000)]
pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code.

* config/pa/pa.c (pa_som_asm_init_sections): Don't force all constant
data into data section when generating PIC code.
(pa_select_section): Use pa_reloc_rw_mask() to qualify relocs.
(pa_reloc_rw_mask): Return 3 when generating PIC code and when
generating code for SOM targets earlier than HP-UX 11.  Otherwise,
return 2 for SOM and 0 for other targets.

From-SVN: r273557

5 years agotree-ssa-dse.c (initialize_ao_ref_for_dse): Fix formatting.
Jeff Law [Wed, 17 Jul 2019 20:58:23 +0000 (14:58 -0600)]
tree-ssa-dse.c (initialize_ao_ref_for_dse): Fix formatting.

        * tree-ssa-dse.c (initialize_ao_ref_for_dse): Fix formatting.
        (dse_walker::dse_optimize_stmt): Likewise.  Add missing return to
        avoid unexpected switch statement fallthru.

From-SVN: r273556

5 years agoi386.md (*add<dwi>3_doubleword): Remove redundant constraints.
Uros Bizjak [Wed, 17 Jul 2019 18:32:36 +0000 (20:32 +0200)]
i386.md (*add<dwi>3_doubleword): Remove redundant constraints.

* config/i386/i386.md (*add<dwi>3_doubleword):
Remove redundant constraints.
(*add<mode>_1): Ditto.
(*addhi_1): Ditto.
(*addqi_1): Ditto.
(*addqi_1_slp): Ditto.
(*add<mode>_2): Ditto.
(*addv<mode>4): Ditto.
(*sub<dwi>3_doubleword): Ditto.
(*sub<mode>_1): Ditto.
(*subqi_1_slp): Ditto.
(*sub<mode>_2): Ditto.
(*subv<mode>4): Ditto.
(*sub<mode>_3): Ditto.
(@add<mode>3_carry): Ditto.
(@sub<mode>3_carry): Ditto.
(*add<mode>3_cc_overflow_1): Ditto.
(*add<mode>3_zext_cc_overflow_2): Ditto.
(*anddi_1): Ditto.
(*and<mode>_1): Ditto.
(*andqi_1): Ditto.
(*andqi_1_slp): Ditto.
(*anddi_2): Ditto.
(*andqi_2_maybe_si): Ditto.
(*and<mode>_2): Ditto.
(*andqi_2_slp): Ditto.
(*<code><mode>_1): Ditto.
(*<code>qi_1): Ditto.
(*<code>qi_1_slp): Ditto.
(*<code><mode>_2): Ditto.
(*<code>qi_2_slp): Ditto.

From-SVN: r273554

5 years agore PR c++/90455 (braced-init and incomplete type instantiation)
Marek Polacek [Wed, 17 Jul 2019 18:10:14 +0000 (18:10 +0000)]
re PR c++/90455 (braced-init and incomplete type instantiation)

PR c++/90455
* g++.dg/cpp0x/nsdmi-list6.C: New test.

From-SVN: r273553

5 years agoalias.c (record_component_aliases): Do not simplify pointed-to types of ODR types
Jan Hubicka [Wed, 17 Jul 2019 17:19:21 +0000 (19:19 +0200)]
alias.c (record_component_aliases): Do not simplify pointed-to types of ODR types

* alias.c (record_component_aliases): Do not simplify pointed-to
types of ODR types
* testsuite/g++.dg/lto/alias-4_0.C

From-SVN: r273552

5 years agoi386.md (*andqi_2_maybe_si): Handle potential partial reg stall on alternative 2.
Uros Bizjak [Wed, 17 Jul 2019 14:33:53 +0000 (16:33 +0200)]
i386.md (*andqi_2_maybe_si): Handle potential partial reg stall on alternative 2.

* config/i386/i386.md (*andqi_2_maybe_si): Handle potential
partial reg stall on alternative 2.

From-SVN: r273551

5 years agore PR tree-optimization/91178 (Infinite recursion in split_constant_offset in slp...
Richard Biener [Wed, 17 Jul 2019 11:21:49 +0000 (11:21 +0000)]
re PR tree-optimization/91178 (Infinite recursion in split_constant_offset in slp after r260289)

2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-ssa.c (release_defs_bitset): Iterate from higher to
lower SSA names to avoid quadratic behavior in the common case.
* tree-data-ref.c (split_constant_offset): Add limit argument
and pass it down.  Initialize it from PARAM_SSA_NAME_DEF_CHAIN_LIMIT.
(split_constant_offset_1): Add limit argument and use it to
limit SSA def walking.  Optimize the common plus/minus case.

From-SVN: r273550

5 years agore PR tree-optimization/91178 (Infinite recursion in split_constant_offset in slp...
Richard Biener [Wed, 17 Jul 2019 10:26:25 +0000 (10:26 +0000)]
re PR tree-optimization/91178 (Infinite recursion in split_constant_offset in slp after r260289)

2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-vect-stmts.c (get_group_load_store_type): For SLP
loads with a gap larger than the vector size always use
VMAT_STRIDED_SLP.
(vectorizable_load): For VMAT_STRIDED_SLP with a permutation
avoid loading vectors that are only contained in the gap
and thus are not needed.

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

From-SVN: r273549

5 years agore PR tree-optimization/91180 (wrong code at -O and above with __builtin_memset())
Richard Biener [Wed, 17 Jul 2019 09:35:04 +0000 (09:35 +0000)]
re PR tree-optimization/91180 (wrong code at -O and above with __builtin_memset())

2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91180
* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix offset
computation for memset partial defs.

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

From-SVN: r273548

5 years ago* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
Andreas Schwab [Wed, 17 Jul 2019 08:17:53 +0000 (08:17 +0000)]
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r273547

5 years agore PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size...
Jakub Jelinek [Wed, 17 Jul 2019 07:15:30 +0000 (09:15 +0200)]
re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref'))

PR tree-optimization/91157
* tree-vect-generic.c (expand_vector_comparison): Handle lhs being
a vector boolean with scalar mode.
(expand_vector_condition): Handle first operand being a vector boolean
with scalar mode.
(expand_vector_operations_1): For comparisons, don't bail out early
if the return type is vector boolean with scalar mode, but comparison
operand type is not.

* gcc.target/i386/avx512f-pr91157.c: New test.
* gcc.target/i386/avx512bw-pr91157.c: New test.

From-SVN: r273545

5 years agogimple.h (enum gf_mask): Remove GF_OMP_FOR_SIMD...
Jakub Jelinek [Wed, 17 Jul 2019 07:13:52 +0000 (09:13 +0200)]
gimple.h (enum gf_mask): Remove GF_OMP_FOR_SIMD...

* gimple.h (enum gf_mask): Remove GF_OMP_FOR_SIMD, change
GF_OMP_FOR_KIND_SIMD to a value serially after other kinds,
divide GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_COMBINED,
GF_OMP_FOR_COMBINED_INTO, GF_OMP_FOR_GRID_PHONY,
GF_OMP_FOR_GRID_INTRA_GROUP and GF_OMP_FOR_GRID_GROUP_ITER by two.
* omp-grid.c (grid_process_grid_body,
grid_eliminate_combined_simd_part): Use GF_OMP_FOR_KIND_SIMD instead
of GF_OMP_FOR_SIMD, don't test & GF_OMP_FOR_SIMD but
== GF_OMP_FOR_KIND_SIMD.
* omp-low.c (build_outer_var_ref, scan_sharing_clauses,
check_omp_nesting_restrictions, scan_omp_1_stmt,
lower_rec_input_clauses, lower_lastprivate_conditional_clauses,
lower_lastprivate_clauses, lower_reduction_clauses, lower_omp_scan,
omp_find_scan): Likewise.
* omp-expand.c (expand_omp_for): Likewise.
* omp-general.c (omp_extract_for_data): Likewise.

From-SVN: r273544

5 years agore PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size...
Jakub Jelinek [Wed, 17 Jul 2019 07:13:17 +0000 (09:13 +0200)]
re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref'))

PR tree-optimization/91157
* tree-vect-generic.c (expand_vector_comparison): Handle lhs being
a vector boolean with scalar mode.
(expand_vector_condition): Handle first operand being a vector boolean
with scalar mode.
(expand_vector_operations_1): For comparisons, don't bail out early
if the return type is vector boolean with scalar mode, but comparison
operand type is not.

* gcc.target/i386/avx512f-pr91157.c: New test.
* gcc.target/i386/avx512bw-pr91157.c: New test.

From-SVN: r273543

5 years agore PR tree-optimization/91181 (Failing as_as type conversion in vect_build_slp_tree_1)
Richard Biener [Wed, 17 Jul 2019 07:07:21 +0000 (07:07 +0000)]
re PR tree-optimization/91181 (Failing as_as type conversion in vect_build_slp_tree_1)

2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91181
* tree-vect-slp.c (vect_build_slp_tree_1): Do not compare
IFN_LOADs as calls.

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

From-SVN: r273542

5 years agoDaily bump.
GCC Administrator [Wed, 17 Jul 2019 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273541

5 years agore PR fortran/90903 (Implement runtime checks for bit manipulation intrinsics)
Harald Anlauf [Tue, 16 Jul 2019 19:58:15 +0000 (19:58 +0000)]
re PR fortran/90903 (Implement runtime checks for bit manipulation intrinsics)

2019-07-16  Harald Anlauf  <anlauf@gmx.de>

PR fortran/90903
* libgfortran.h: Add mask for -fcheck=bits option.
* options.c (gfc_handle_runtime_check_option): Add option "bits"
to run-time checks selectable via -fcheck.
* trans-intrinsic.c (gfc_conv_intrinsic_btest)
(gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
(gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
(gfc_conv_intrinsic_ishftc): Implement run-time checks for the
POS, LEN, SHIFT, and SIZE arguments.
* gfortran.texi: Document run-time checks for bit manipulation
intrinsics.
* invoke.texi: Document new -fcheck=bits option.

PR fortran/90903
* gfortran.dg/check_bits_1.f90: New testcase.

From-SVN: r273535

5 years agoi386.md (*testdi_1): Match CCZmode for constants that might have the SImode sign...
Uros Bizjak [Tue, 16 Jul 2019 17:18:32 +0000 (19:18 +0200)]
i386.md (*testdi_1): Match CCZmode for constants that might have the SImode sign bit set.

* config/i386/i386.md (*testdi_1): Match CCZmode for
constants that might have the SImode sign bit set.
(*testqi_1_maybe_si): Remove "!" constraint modifier.
Use correct constraints for pentium pairing.
(*test<mode>_1): Ditto.

From-SVN: r273534

5 years agore PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)
Jeff Law [Tue, 16 Jul 2019 14:57:51 +0000 (08:57 -0600)]
re PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)

PR rtl-optimization/91173
* g++.dg/pr91173.C: New test.

From-SVN: r273531

5 years agore PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)
Jeff Law [Tue, 16 Jul 2019 14:44:44 +0000 (08:44 -0600)]
re PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)

PR rtl-optimization/91173
* tree-ssa-address.c (addr_for_mem_ref): If the base is an
SSA_NAME with a constant value, fold its value into the offset
and clear the base before calling gen_addr_rtx.

From-SVN: r273529

5 years agoAdd missing testcase for PR89190
Wilco Dijkstra [Tue, 16 Jul 2019 12:06:55 +0000 (12:06 +0000)]
Add missing testcase for PR89190

    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

From-SVN: r273524

5 years agore PR rtl-optimization/91164 (ICE in verify_dominators, at dominance.c:1184 (error...
Jakub Jelinek [Tue, 16 Jul 2019 11:37:05 +0000 (13:37 +0200)]
re PR rtl-optimization/91164 (ICE in verify_dominators, at dominance.c:1184 (error: dominator of 114 should be 112, not 16))

PR rtl-optimization/91164
* dse.c (rest_of_handle_dse): If dead edges have been purged,
invalidate dominance info.

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

From-SVN: r273522

5 years agoalias-1_0.C: Use -O3.
Jan Hubicka [Tue, 16 Jul 2019 09:29:17 +0000 (11:29 +0200)]
alias-1_0.C: Use -O3.

* g++.dg/lto/alias-1_0.C: Use -O3.
* g++.dg/lto/alias-2_0.C: Use -O3.
* g++.dg/lto/alias-3_0.C: Add loop to enable inlining with
-fno-use-linker-plugin.
* g++.dg/lto/alias-3_1.C: Remove dg-lto-do and dg-lto-options.

From-SVN: r273520

5 years agoDon't xfail gcc.dg/tree-ssa/pr84512.c on 64-bit SPARC
Rainer Orth [Tue, 16 Jul 2019 09:27:57 +0000 (09:27 +0000)]
Don't xfail gcc.dg/tree-ssa/pr84512.c on 64-bit SPARC

* gcc.dg/tree-ssa/pr84512.c: Don't xfail scan-tree-dump on
sparcv9.

From-SVN: r273519

5 years agoRequire int128 support in gcc.dg/autopar/pr91162.c
Rainer Orth [Tue, 16 Jul 2019 09:13:16 +0000 (09:13 +0000)]
Require int128 support in gcc.dg/autopar/pr91162.c

* gcc.dg/autopar/pr91162.c: Require int128 support.

From-SVN: r273518

5 years agoSimplify range location creation in C++ parser.
Jason Merrill [Tue, 16 Jul 2019 08:57:03 +0000 (04:57 -0400)]
Simplify range location creation in C++ parser.

Many places in the parser follow the same pattern of capturing the location
of the last lexed token, either before or after lexing it, and then using
that as the end of a location range; this can be simplified by passing the
lexer to make_location and grabbing the token location there.

* parser.c (make_location): Add overload taking cp_lexer* as last
parameter.

From-SVN: r273516

5 years agoAdd parens around constraint in <memory>.
Jason Merrill [Tue, 16 Jul 2019 08:54:47 +0000 (04:54 -0400)]
Add parens around constraint in <memory>.

C++20 concepts require parens around atomic constraints that are not
primary-expressions.

* include/std/memory (uses_allocator_construction_args): Add parens
around constraint.

From-SVN: r273515

5 years agoSimplify type-specifier parsing.
Jason Merrill [Tue, 16 Jul 2019 08:50:16 +0000 (04:50 -0400)]
Simplify type-specifier parsing.

Previously, the tentative parses for optional type-specifier and to support
class template argument deduction were combined awkwardly.  This
reorganization was motivated by the new concepts branch.

* parser.c (cp_parser_simple_type_specifier): Separate tentative
parses for optional type-spec and CTAD.

From-SVN: r273514

5 years agoFix g++.dg/template/pr84789.C on new concepts branch.
Jason Merrill [Tue, 16 Jul 2019 08:49:04 +0000 (04:49 -0400)]
Fix g++.dg/template/pr84789.C on new concepts branch.

On the concepts branch I ran into trouble where a pre-parsed dependent
nested-name-specifier got replaced on a subsequent parse with is_declaration
by one with typenames resolved, which was then used wrongly on a further
parse with !is_declaration.

    * parser.c (cp_parser_nested_name_specifier_opt): If the token is
    already CPP_NESTED_NAME_SPECIFIER, leave it alone.

From-SVN: r273513

5 years agoReport ambiguous uses of .md attributes
Richard Sandiford [Tue, 16 Jul 2019 08:41:21 +0000 (08:41 +0000)]
Report ambiguous uses of .md attributes

This patch reports an error if the .md file has an unscoped
attribute that maps to more than one possible value.

2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* read-md.h (md_reader::record_potential_iterator_use): Add a
file_location parameter.
* read-rtl.c (attribute_use::loc): New field.
(map_attr_string): Take a file_location parameter.  Report cases
in which attributes map to multiple distinct values.
(apply_attribute_uses): Update call accordingly.
(md_reader::handle_overloaded_name): Likewise.
(md_reader::apply_iterator_to_string): Likewise.  Skip empty
nonnull strings.
(record_attribute_use): Take a file_location parameter.
Initialize attribute_use::loc.
(md_reader::record_potential_iterator_use): Take a file_location
parameter.  Update call to record_attribute_use.
(rtx_reader::rtx_alloc_for_name): Update call accordingly.
(rtx_reader::read_rtx_code): Likewise.
(rtx_reader::read_rtx_operand): Likewise.  Record a location
for implicitly-expanded empty strings.

From-SVN: r273511

5 years agoUse file_location for md_reader's ptr_loc
Richard Sandiford [Tue, 16 Jul 2019 08:41:13 +0000 (08:41 +0000)]
Use file_location for md_reader's ptr_loc

Also make it public, so that clients can use the location for error
reporting.

2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* read-md.h (md_reader::ptr_loc): Moved from read-md.c.
Use file_location instead of separate fields.
(md_reader::set_md_ptr_loc): Take a file_location instead of a
separate filename and line number.
* read-md.c (ptr_loc): As above.
(md_reader::copy_md_ptr_loc): Update for new ptr_loc layout.
(md_reader::fprint_md_ptr_loc): Likewise.
(md_reader::set_md_ptr_loc): Likewise.  Take a file_location
instead of a separate filename and line number.
(md_reader::read_string): Update call accordingly.

From-SVN: r273510

5 years ago[rs6000] Fix ambiguous .md attribute uses
Richard Sandiford [Tue, 16 Jul 2019 08:41:03 +0000 (08:41 +0000)]
[rs6000] Fix ambiguous .md attribute uses

This patch is part of a series that fixes ambiguous attribute
uses in .md files, i.e. cases in which attributes didn't use
<ITER:ATTR> to specify an iterator, and in which <ATTR> could
have different values depending on the iterator chosen.

No behavioural change -- produces the same code as before except
for formatting and line numbers.

2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/rs6000/rs6000.md (*mov<mode>_update1): Explicitly
use <SFDF:mode>, <SFDF:MODE>, <SFDF:Ff> and <SFDF:bits> rather than
leaving the choice between SFDF and P implicit.
(*mov<mode>_update2): Likewise.
(*cmp<IBM128:mode>_internal2): Explicitly use <IBM128:MODE>
rather than leaving the choice betweem IBM128 and GPR implicit.
(*fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Explicitly use
<IEEE128:MODE> rather than leaving the choice between IEEE128 and
QHSI implicit.
(AltiVec define_peephole2s): Explicitly use <ALTIVEC_DFORM:MODE>
rather than leaving the choice between ALTIVEC_DFORM and P implicit.
* config/rs6000/vsx.md
(*vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>)
(*vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Explicitly
use <FL_CONV:VSisa> rather than leaving the choice between FL_CONV
and VSX_EXTRACT_I implicit.

From-SVN: r273509

5 years ago[mips] Fix ambiguous .md attribute uses
Richard Sandiford [Tue, 16 Jul 2019 08:40:55 +0000 (08:40 +0000)]
[mips] Fix ambiguous .md attribute uses

This patch is part of a series that fixes ambiguous attribute
uses in .md files, i.e. cases in which attributes didn't use
<ITER:ATTR> to specify an iterator, and in which <ATTR> could
have different values depending on the iterator chosen.

No behavioural change -- produces the same code as before.

2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/mips/micromips.md (*movep<MOVEP1:mode><MOVEP2:mode>):
Explicitly use <MOVEP1:MODE> for the mode attribute.

From-SVN: r273508

5 years agoPR91176: Skip debug insns when computing inline costs
Jan Hubicka [Tue, 16 Jul 2019 08:12:05 +0000 (10:12 +0200)]
PR91176: Skip debug insns when computing inline costs

Apply Honza's fix for an aarch64-linux-gnu bootstrap failure.

2019-07-16  Jan Hubicka  <hubicka@ucw.cz>

gcc/
PR bootstrap/91176
* ipa-fnsummary.c (analyze_function_body): Skip debug stmts

From-SVN: r273507

5 years agoRemove trailing space.
Jason Merrill [Tue, 16 Jul 2019 07:34:58 +0000 (03:34 -0400)]
Remove trailing space.

From-SVN: r273506

5 years agoDaily bump.
GCC Administrator [Tue, 16 Jul 2019 00:16:48 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273505

5 years ago* config/i386/i386.md (*testdi_1): Put back "%" constraint modifier.
Uros Bizjak [Mon, 15 Jul 2019 22:23:11 +0000 (00:23 +0200)]
* config/i386/i386.md (*testdi_1): Put back "%" constraint modifier.

From-SVN: r273501

5 years agoruntime: expose the g variable
Ian Lance Taylor [Mon, 15 Jul 2019 21:17:16 +0000 (21:17 +0000)]
runtime: expose the g variable

    Currently, getg is implemented in C, which loads the thread-local
    g variable. The g variable is declared static in C.

    This CL exposes the g variable, so it can be accessed from the Go
    side. This allows the Go compiler to inline getg calls to direct
    access of g.

    Currently, the actual inlining is only implemented in the gollvm
    compiler. The g variable is thread-local and the compiler backend
    may choose to cache the TLS address in a register or on stack. If
    a thread switch happens the cache may become invalid. I don't
    know how to disable the TLS address cache in gccgo, therefore
    the inlining of getg is not implemented. In the future gccgo may
    gain this if we know how to do it safely.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186238

From-SVN: r273499

5 years agors6000: Always output .machine
Segher Boessenkool [Mon, 15 Jul 2019 20:57:53 +0000 (22:57 +0200)]
rs6000: Always output .machine

We now can always output .machine (if we output it at all for the
current target).

PR target/91050
* config/rs6000/rs6000.c (rs6000_file_start): Never skip emitting a
.machine directive.

From-SVN: r273498

5 years agoi386.md (@test<mode>_ccno_1): Rename from test<mode>_ccno_1.
Uros Bizjak [Mon, 15 Jul 2019 20:26:43 +0000 (22:26 +0200)]
i386.md (@test<mode>_ccno_1): Rename from test<mode>_ccno_1.

* config/i386/i386.md (@test<mode>_ccno_1):
Rename from test<mode>_ccno_1.
(*testdi_1): Remove redundant alternatives.  Remove modrm attribute.
(*testqi_1_maybe_si): Remove modrm attribute.
(*test<mode>_1): Ditto.
* config/i386/i386-expand.c (ix86_split_idivmod): Use
gen_test_ccno_1 and gen_extend_insn.

From-SVN: r273496

5 years agotree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p to 0.
Jan Hubicka [Mon, 15 Jul 2019 19:21:36 +0000 (21:21 +0200)]
tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p to 0.

* tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p
to 0.

From-SVN: r273495

5 years agore PR tree-optimization/91162 (ICE: tree check: expected class 'type', have 'exceptio...
Richard Biener [Mon, 15 Jul 2019 12:48:47 +0000 (12:48 +0000)]
re PR tree-optimization/91162 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument))

2019-07-15  Richard Biener  <rguenther@suse.de>

PR middle-end/91162
* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
node make sure to replace all uses with something valid.

* gcc.dg/autopar/pr91162.c: New testcase.

From-SVN: r273492

5 years agore PR tree-optimization/88497 (Improve Accumulation in Auto-Vectorized Code)
Kewen Lin [Mon, 15 Jul 2019 05:12:05 +0000 (05:12 +0000)]
re PR tree-optimization/88497 (Improve Accumulation in Auto-Vectorized Code)

gcc/ChangeLog

2019-07-15  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/88497
    * tree-ssa-reassoc.c (reassociate_bb): Swap the positions of
    GIMPLE_BINARY_RHS check and gimple_visited_p check, call new
    function undistribute_bitref_for_vector.
    (undistribute_bitref_for_vector): New function.
    (cleanup_vinfo_map): Likewise.
    (sort_by_mach_mode): Likewise.

gcc/testsuite/ChangeLog

2019-07-15  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/88497
    * gcc.dg/tree-ssa/pr88497-1.c: New test.
    * gcc.dg/tree-ssa/pr88497-2.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-3.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-4.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-5.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-6.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-7.c: Likewise.

From-SVN: r273490

5 years agoDaily bump.
GCC Administrator [Mon, 15 Jul 2019 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273488

5 years agore PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision...
Jerry DeLisle [Sun, 14 Jul 2019 22:52:58 +0000 (22:52 +0000)]
re PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision (?))

2019-07-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/87233
* expr.c (check_restricted): Relax constraint C1279 which was
removed from F2008 and above.

* gfortran.dg/initialization_14.f90: Modify to now pass by
removing two dg-error commands. Added comments.
* gfortran.dg/initialization_30.f90: New test that includes the
two tests removed above with the 'dg-options -std=f95'.

From-SVN: r273484

5 years agopr84512.c (dg-final): Remove XFAIL on alpha*-*-*.
Uros Bizjak [Sun, 14 Jul 2019 20:27:25 +0000 (22:27 +0200)]
pr84512.c (dg-final): Remove XFAIL on alpha*-*-*.

* gcc.dg/tree-ssa/pr84512.c (dg-final): Remove XFAIL on alpha*-*-*.

From-SVN: r273483

5 years agoi386.md (nonmemory_szext_operand): New mode attribute.
Uros Bizjak [Sun, 14 Jul 2019 18:52:16 +0000 (20:52 +0200)]
i386.md (nonmemory_szext_operand): New mode attribute.

* config/i386/i386.md (nonmemory_szext_operand): New mode attribute.
(test<mode>_ccno_1): Macroize insn pattern from testsi_ccno_1
and testdi_ccno_1 using SWI48 mode attribute.
(*testdi_1): Use x86_64_szext_nonmemory_operand instead of
x86_64_szext_general_operand.
(*testqi_1_maybe_si): Use nonmemory_operand instead of general_operand.
(*test<mode>_1): Use nonmemory_szext_operand mode attribute
instead of genera_operand mode attribute.

From-SVN: r273482

5 years agogdbhooks.py: dump-fn, dot-fn: cast ret values of fopen/fclose
Vladislav Ivanishin [Sun, 14 Jul 2019 13:19:29 +0000 (13:19 +0000)]
gdbhooks.py: dump-fn, dot-fn: cast ret values of fopen/fclose

Work around the following

    (gdb) Python Exception <class 'gdb.error'> 'fclose@@GLIBC_2.2.5' has
    unknown return type; cast the call to its declared return type:
    (gdb) Error occurred in Python: 'fclose@@GLIBC_2.2.5' has unknown
    return type; cast the call to its declared return type

This is due to GDB not being able to pick up and use the return types from
debug info for external declarations.

2019-07-14  Vladislav Ivanishin <vlad@ispras.ru>

        * gdbhooks.py (DumpFn.invoke): Add explicit casts of return values of
        fopen and fclose to their respective types.
        (DotFn.invoke): Ditto.

From-SVN: r273480

5 years agoipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.
Jan Hubicka [Sun, 14 Jul 2019 11:57:10 +0000 (13:57 +0200)]
ipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.

* ipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.
(ipa_fn_summary::~ipa_fn_summary): Do not destroy array_index.
(ipa_fn_summary_t::duplicate): Do not duplicate array_index.
(array_index_predicate): Remove.
(analyze_function_body): Account cost for variable ofsetted array
indexing.
(estimate_node_size_and_time): Do not compute array index hint.
(ipa_merge_fn_summary_after_inlining): Do not merge array index hint.
(inline_read_section): Do not read array index hint.
(ipa_fn_summary_write): Do not write array index hint.
* doc/invoke.texi (ipa-cp-array-index-hint-bonus): Remove.
* ipa-cp.c (hint_time_bonus): Remove.
* ipa-fnsummary.h (ipa_hints_vals): Remove array_index.
(ipa_fnsummary): Remove array_index.
* ipa-inline.c (want_inline_small_function_p): Do not use
array_index.
(edge_badness): Likewise.
* params.def (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Remove.

From-SVN: r273479

5 years agors6000: Shut up -Wformat-diag a little more
Segher Boessenkool [Sun, 14 Jul 2019 08:24:38 +0000 (10:24 +0200)]
rs6000: Shut up -Wformat-diag a little more

PR target/91148
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Remove
superfluous "builtin function" phrasing.

gcc/testsuite/
* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust.
* gcc.target/powerpc/byte-in-set-2.c: Adjust.
* gcc.target/powerpc/cmpb-3.c: Adjust.
* gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust.
* gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust.

From-SVN: r273475

5 years agoDaily bump.
GCC Administrator [Sun, 14 Jul 2019 00:16:17 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r273474

5 years ago[Darwin, PPC, testsuite] Require stabs support for a test.
Iain Sandoe [Sat, 13 Jul 2019 21:21:43 +0000 (21:21 +0000)]
[Darwin, PPC, testsuite] Require stabs support for a test.

The test fails if the assembler doesn't support stabs.

2019-07-13  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs
support.

From-SVN: r273470

5 years agotree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p): Break out from ...
Jan Hubicka [Sat, 13 Jul 2019 18:46:40 +0000 (20:46 +0200)]
tree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p): Break out from ...

* tree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p):
Break out from ...
(aliasing_component_refs_walk): Break out from ...
(aliasing_component_refs_p): ... here.

From-SVN: r273469

5 years agors6000: Shut up -Wformat-diag somewhat
Segher Boessenkool [Sat, 13 Jul 2019 15:57:21 +0000 (17:57 +0200)]
rs6000: Shut up -Wformat-diag somewhat

We currently get lot of build warnings like
/home/segher/src/gcc/gcc/config/rs6000/rs6000-c.c:7039:12: warning: misspelled term 'builtin function' in format; use 'built-in function' instead [-Wformat-diag]
 7039 |    error ("builtin function %qs not supported in this compiler "
      |            ^~~~~~~~~~~~~~~~

That would print something like
  builtin function '__builtin_example' not supported in this compiler

Changing that to "built-in" as suggested only makes this worse.
Instead, let's just remove the whole "builtin function" phrase.

PR target/91148
* config/rs6000/rs6000.c (rs6000_invalid_builtin): Remove superfluous
"builtin function" phrasing.

gcc/testsuite/
* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Adjust.
* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust.
* gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Adjust.
* gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Adjust.
* gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Adjust.
* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Adjust.
* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Adjust.
* gcc.target/powerpc/bfp/scalar-test-neg-5.c: Adjust.
* gcc.target/powerpc/bfp/vec-extract-exp-2.c: Adjust.
* gcc.target/powerpc/bfp/vec-extract-exp-3.c: Adjust.
* gcc.target/powerpc/bfp/vec-extract-sig-2.c: Adjust.
* gcc.target/powerpc/bfp/vec-extract-sig-3.c: Adjust.
* gcc.target/powerpc/bfp/vec-insert-exp-2.c: Adjust.
* gcc.target/powerpc/bfp/vec-insert-exp-3.c: Adjust.
* gcc.target/powerpc/bfp/vec-insert-exp-6.c: Adjust.
* gcc.target/powerpc/bfp/vec-insert-exp-7.c: Adjust.
* gcc.target/powerpc/bfp/vec-test-data-class-2.c: Adjust.
* gcc.target/powerpc/bfp/vec-test-data-class-3.c: Adjust.
* gcc.target/powerpc/byte-in-either-range-1.c: Adjust.
* gcc.target/powerpc/byte-in-range-1.c: Adjust.
* gcc.target/powerpc/byte-in-set-1.c: Adjust.
* gcc.target/powerpc/byte-in-set-2.c: Adjust.
* gcc.target/powerpc/cmpb-3.c: Adjust.
* gcc.target/powerpc/crypto-builtin-2.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-1.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-11.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-16.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-21.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-26.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-31.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-36.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-41.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-46.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-51.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-56.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-6.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-61.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-66.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-71.c: Adjust.
* gcc.target/powerpc/dfp/dtstsfi-76.c: Adjust.
* gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-cmpnez-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Adjust.
* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Adjust.
* gcc.target/powerpc/vsu/vec-xl-len-12.c: Adjust.
* gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust.
* gcc.target/powerpc/vsu/vec-xlx-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-xrx-7.c: Adjust.
* gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust.
* gcc.target/powerpc/vsu/vec-xst-len-13.c: Adjust.

From-SVN: r273468