platform/upstream/gcc.git
7 years agoDaily bump.
GCC Administrator [Sat, 22 Jul 2017 00:16:29 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r250451

7 years agors6000-c.c (altivec_overloaded_builtins): Add ALTIVEC_BUILTIN_VMULESW...
Carl Love [Sat, 22 Jul 2017 00:16:26 +0000 (00:16 +0000)]
rs6000-c.c (altivec_overloaded_builtins): Add ALTIVEC_BUILTIN_VMULESW...

gcc/ChangeLog:

2017-07-21  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
* config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
VMULOSW): New enum "unspec" values.
(altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
altivec_vmulosw): New patterns.
* config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
VMULOSW): Add definitions.

gcc/testsuite/ChangeLog:

2017-07-21  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtins-2.c (vmulosh, vmulouh, vmulesh,
vmuleuh): Fix scan-assembler-times should check for word not half word
instructions.

From-SVN: r250450

7 years agoAdd RDMA support to falkor port.
Jim Wilson [Fri, 21 Jul 2017 21:56:57 +0000 (21:56 +0000)]
Add RDMA support to falkor port.

gcc/
* config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
(qdf24xx): Likewise.
* config/aarch64/aarch64-options-extensions.def (rdma); New.
* config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
(AARCH64_FL_V8_1): Renumber.
(AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
(AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
* config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
* doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
rdma to feature modifiers list.

gcc/testsuite/
* lib/target-supports.exp (add_options_for_arm_v8_1a_neon): Delete
redundant -march option.
(check_effective_target_arm_v8_1a_neon_ok_nocache): Try armv8-a+rdma
in addition to armv8.1-a.

From-SVN: r250444

7 years agosyscall: call f?statfs64 on GNU/Linux
Ian Lance Taylor [Fri, 21 Jul 2017 20:25:13 +0000 (20:25 +0000)]
syscall: call f?statfs64 on GNU/Linux

    We unconditionally set _FILE_OFFSET_BITS to 64 in configure.ac, so we
    should unconditionally call the statfs64 and fstatfs64 functions.
    These functions should be available on all versions of GNU/Linux since 2.6.
    On 64-bit systems they are aliased to statfs/fstatfs, and on 32-bit
    systems they use the 64-bit data structures.

    Fixes golang/go#20922

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

From-SVN: r250443

7 years agore PR middle-end/56727 (Recursive call goes through the PLT unnecessarily)
Yury Gribov [Fri, 21 Jul 2017 19:48:51 +0000 (19:48 +0000)]
re PR middle-end/56727 (Recursive call goes through the PLT unnecessarily)

2017-07-21  Yury Gribov  <tetra2005@gmail.com>

PR middle-end/56727
* ipa-visibility (function_and_variable_visibility): Convert
recursive PLT call to direct call if appropriate.

* gcc.dg/pr56727-1.c: New test.
* gcc.dg/pr56727-2.c: New test.

From-SVN: r250442

7 years agosearch.c (lookup_conversion_operator): Return overloads.
Nathan Sidwell [Fri, 21 Jul 2017 19:23:40 +0000 (19:23 +0000)]
search.c (lookup_conversion_operator): Return overloads.

* search.c (lookup_conversion_operator): Return overloads.
(lookup_fnfields_idx_nolazy): Absorb into ...
(lookup_fnfields_slot_nolaxy): ... here.
(lookup_fnfields_1): Absorb into ...
(lookup_fnfields_slot): ... here.

From-SVN: r250440

7 years agoruntime: don't use runtime_lock in __go_get_backtrace_state
Ian Lance Taylor [Fri, 21 Jul 2017 18:27:35 +0000 (18:27 +0000)]
runtime: don't use runtime_lock in __go_get_backtrace_state

    If getSiginfo does not know how to determine the PC, it will call
    runtime_callers. That can happen in a thread that was started by
    non-Go code, in which case the TLS variable g will not be set, in
    which case runtime_lock will crash.

    Avoid the problem by using atomic operations for the lock. This is OK
    since creating a backtrace state is fast and never blocks.

    The test case is TestCgoExternalThreadSIGPROF in the runtime package
    on a system that getSiginfo doesn't handle specially.

    Updates golang/go#20931

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

From-SVN: r250439

7 years agoRemove special CDtor METHOD_VEC slots.
Nathan Sidwell [Fri, 21 Jul 2017 18:11:23 +0000 (18:11 +0000)]
Remove special CDtor METHOD_VEC slots.

* cp-tree.h (CLASSTYPE_CONSTRUCTOR_SLOT,
CLASSTYPE_DESTRUCTOR_SLOT): Delete.
(CLASSTYPE_CONSTRUCTORS): Use lookup_fnfields_slot_nolazy.
(CLASSTYPE_DESTRUCTOR): Likewise.
* class (add_method): Don't use special cdtor slots.
* search.c (lookup_fnfields_idx_nolazy): Likewise.
(look_for_overrides_here): Use lookup_fnfields_slot.
* semantics (classtype_has_nothrow_assign_or_copy_p): Likewise.

From-SVN: r250437

7 years agoruntime: handle PPC/PPC64 GNU/Linux in getSiginfo
Ian Lance Taylor [Fri, 21 Jul 2017 18:08:01 +0000 (18:08 +0000)]
runtime: handle PPC/PPC64 GNU/Linux in getSiginfo

    Updates golang/go#20931

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

From-SVN: r250436

7 years agofiletype.awk: Add AIX XCOFF type detection.
Tony Reix [Fri, 21 Jul 2017 18:05:08 +0000 (18:05 +0000)]
filetype.awk: Add AIX XCOFF type detection.

* filetype.awk: Add AIX XCOFF type detection.
* configure.ac: Recognize xcoff format.
* Makefile.am (FORMAT_FILES): Add xcoff.c.
* fileline.c: Include <unistd.h>.
(fileline_initialize): Add case for AIX procfs.
* xcoff.c: New file.
* configure, Makefile.in: Rebuild.

From-SVN: r250435

7 years agocall.c (add_candidates): Move decls to initialization.
Nathan Sidwell [Fri, 21 Jul 2017 17:58:48 +0000 (17:58 +0000)]
call.c (add_candidates): Move decls to initialization.

* call.c (add_candidates): Move decls to initialization.  Don't
use !!.

From-SVN: r250434

7 years agoruntime: allocate more stack space in CgoCallbackGC test
Ian Lance Taylor [Fri, 21 Jul 2017 17:50:14 +0000 (17:50 +0000)]
runtime: allocate more stack space in CgoCallbackGC test

    Allocate enough stack space so that the test will work on a system
    that does not support split stacks.

    This test is actually not very meaningful for gccgo at present, but it
    doesn't hurt to keep running it.

    Updates golang/go#20931

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

From-SVN: r250433

7 years agoNow completeting the mmintrin.h intrinsic headers for PowerPC by
Steven Munroe [Fri, 21 Jul 2017 17:44:22 +0000 (17:44 +0000)]
Now completeting the mmintrin.h intrinsic headers for PowerPC by
adding the DG tests.

2017-07-21  Steven Munroe  <munroesj@gcc.gnu.org>

* gcc.target/powerpc/mmx-check.h: New file.
* gcc.target/powerpc/mmx-packs.c: New file.
* gcc.target/powerpc/mmx-packssdw-1.c: New file.
* gcc.target/powerpc/mmx-packsswb-1.c: New file.
* gcc.target/powerpc/mmx-packuswb-1.c: New file.
* gcc.target/powerpc/mmx-paddb-1.c: New file.
* gcc.target/powerpc/mmx-paddd-1.c: New file.
* gcc.target/powerpc/mmx-paddsb-1.c: New file.
* gcc.target/powerpc/mmx-paddsw-1.c: New file.
* gcc.target/powerpc/mmx-paddusb-1.c: New file.
* gcc.target/powerpc/mmx-paddusw-1.c: New file.
* gcc.target/powerpc/mmx-paddw-1.c: New file.
* gcc.target/powerpc/mmx-pcmpeqb-1.c: New file.
* gcc.target/powerpc/mmx-pcmpeqd-1.c: New file.
* gcc.target/powerpc/mmx-pcmpeqw-1.c: New file.
* gcc.target/powerpc/mmx-pcmpgtb-1.c: New file.
* gcc.target/powerpc/mmx-pcmpgtd-1.c: New file.
* gcc.target/powerpc/mmx-pcmpgtw-1.c: New file.
* gcc.target/powerpc/mmx-pmaddwd-1.c: New file.
* gcc.target/powerpc/mmx-pmulhw-1.c: New file.
* gcc.target/powerpc/mmx-pmullw-1.c: New file.
* gcc.target/powerpc/mmx-pslld-1.c: New file.
* gcc.target/powerpc/mmx-psllw-1.c: New file.
* gcc.target/powerpc/mmx-psrad-1.c: New file.
* gcc.target/powerpc/mmx-psraw-1.c: New file.
* gcc.target/powerpc/mmx-psrld-1.c: New file.
* gcc.target/powerpc/mmx-psrlw-1.c: New file.
* gcc.target/powerpc/mmx-psubb-2.c: New file.
* gcc.target/powerpc/mmx-psubd-2.c: New file.
* gcc.target/powerpc/mmx-psubsb-1.c: New file.
* gcc.target/powerpc/mmx-psubsw-1.c: New file.
* gcc.target/powerpc/mmx-psubusb-1.c: New file.
* gcc.target/powerpc/mmx-psubusw-1.c: New file.
* gcc.target/powerpc/mmx-psubw-2.c: New file.
* gcc.target/powerpc/mmx-punpckhbw-1.c: New file.
* gcc.target/powerpc/mmx-punpckhdq-1.c: New file.
* gcc.target/powerpc/mmx-punpckhwd-1.c: New file.
* gcc.target/powerpc/mmx-punpcklbw-1.c: New file.
* gcc.target/powerpc/mmx-punpckldq-1.c: New file.
* gcc.target/powerpc/mmx-punpcklwd-1.c: New file.

From-SVN: r250432

7 years agotree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's operand 1 to see if the...
Andrew Pinski [Fri, 21 Jul 2017 17:16:51 +0000 (17:16 +0000)]
tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's operand 1 to see if the types precision matches.

2017-07-21  Andrew Pinski  <apinski@cavium.com>

        * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
        operand 1 to see if the types precision matches.
        * fold-const.c (operand_equal_p): Likewise.

From-SVN: r250431

7 years agoAdd AddressSanitizer annotations to std::vector
Jonathan Wakely [Fri, 21 Jul 2017 16:05:10 +0000 (17:05 +0100)]
Add AddressSanitizer annotations to std::vector

* config/allocator/malloc_allocator_base.h [__SANITIZE_ADDRESS__]
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define.
* config/allocator/new_allocator_base.h [__SANITIZE_ADDRESS__]
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define.
* doc/xml/manual/using.xml (_GLIBCXX_SANITIZE_VECTOR): Document macro.
* include/bits/stl_vector.h [_GLIBCXX_SANITIZE_VECTOR]
(_Vector_impl::_Asan, _Vector_impl::_Asan::_Reinit)
(_Vector_impl::_Asan::_Grow, _GLIBCXX_ASAN_ANNOTATE_REINIT)
(_GLIBCXX_ASAN_ANNOTATE_GROW, _GLIBCXX_ASAN_ANNOTATE_GREW)
(_GLIBCXX_ASAN_ANNOTATE_SHRINK, _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC):
Define annotation helper types and macros.
(vector::~vector, vector::push_back, vector::pop_back)
(vector::_M_erase_at_end): Add annotations.
* include/bits/vector.tcc (vector::reserve, vector::emplace_back)
(vector::insert, vector::_M_erase, vector::operator=)
(vector::_M_fill_assign, vector::_M_assign_aux)
(vector::_M_insert_rval, vector::_M_emplace_aux)
(vector::_M_insert_aux, vector::_M_realloc_insert)
(vector::_M_fill_insert, vector::_M_default_append)
(vector::_M_shrink_to_fit, vector::_M_range_insert): Annotate.

From-SVN: r250430

7 years agore PR lto/81487 ([mingw32] ld.exe: error: asprintf failed)
Georg-Johann Lay [Fri, 21 Jul 2017 15:58:14 +0000 (15:58 +0000)]
re PR lto/81487 ([mingw32] ld.exe: error: asprintf failed)

lto-plugin/
PR lto/81487
* lto-plugin.c (claim_file_handler): Use xasprintf instead of
asprintf.
[hi!=0]: Swap hi and lo arguments supplied to xasprintf.

From-SVN: r250428

7 years agore PR tree-optimization/81303 (410.bwaves regression caused by r249919)
Richard Biener [Fri, 21 Jul 2017 11:32:39 +0000 (11:32 +0000)]
re PR tree-optimization/81303 (410.bwaves regression caused by r249919)

2017-07-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81303
* tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
(vect_peeling_hash_get_lowest_cost): Adjust.
(vect_enhance_data_refs_alignment): Likewise.  Use
vect_get_peeling_costs_all_drs to compute the penalty for no
peeling to match up costs.

From-SVN: r250424

7 years agore PR tree-optimization/81500 (ICE with -O3 in process_use, at tree-vect-stmts.c...
Richard Biener [Fri, 21 Jul 2017 11:32:01 +0000 (11:32 +0000)]
re PR tree-optimization/81500 (ICE with -O3 in process_use, at tree-vect-stmts.c:506)

2017-06-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81500
* tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
we didn't identify a reduction path.

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

From-SVN: r250423

7 years agoAdd missing edge probabilities in nvptx_goacc_reduction_init
Tom de Vries [Fri, 21 Jul 2017 09:46:22 +0000 (09:46 +0000)]
Add missing edge probabilities in nvptx_goacc_reduction_init

2017-07-21  Tom de Vries  <tom@codesourcery.com>
    Cesar Philippidis  <cesar@codesourcery.com>

PR gcov-profile/81442
* config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
probabilities.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r250422

7 years agoAdd nvptx_override_options_after_change
Tom de Vries [Fri, 21 Jul 2017 09:46:05 +0000 (09:46 +0000)]
Add nvptx_override_options_after_change

2017-07-21  Tom de Vries  <tom@codesourcery.com>

PR lto/81430
* config/nvptx/nvptx.c (nvptx_override_options_after_change): New
function.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
nvptx_override_options_after_change.

From-SVN: r250421

7 years agodwarf2out.c (output_file_names): Avoid double testing for dwarf_version >= 5.
Ulrich Drepper [Fri, 21 Jul 2017 08:57:04 +0000 (08:57 +0000)]
dwarf2out.c (output_file_names): Avoid double testing for dwarf_version >= 5.

gcc/
* dwarf2out.c (output_file_names): Avoid double testing for
dwarf_version >= 5.

From-SVN: r250420

7 years agoinvoke.texi (AVR Built-in Functions): Re-layout section.
Georg-Johann Lay [Fri, 21 Jul 2017 08:20:51 +0000 (08:20 +0000)]
invoke.texi (AVR Built-in Functions): Re-layout section.

gcc/
* doc/invoke.texi (AVR Built-in Functions): Re-layout section.

From-SVN: r250419

7 years agocfgcleanup.c (flow_find_cross_jump): Do not crossjump across hot/cold regions.
Jan Hubicka [Fri, 21 Jul 2017 07:17:57 +0000 (09:17 +0200)]
cfgcleanup.c (flow_find_cross_jump): Do not crossjump across hot/cold regions.

* cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
hot/cold regions.
(try_crossjump_to_edge): Do not punt on partitioned functions.

From-SVN: r250418

7 years agobb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges): Put all BBs...
Jan Hubicka [Fri, 21 Jul 2017 07:17:22 +0000 (09:17 +0200)]
bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges): Put all BBs reachable only via paths crossing cold region to cold region.

* bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
Put all BBs reachable only via paths crossing cold region to cold
region.
* cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.

From-SVN: r250417

7 years agore PR tree-optimization/81303 (410.bwaves regression caused by r249919)
Richard Biener [Fri, 21 Jul 2017 07:13:57 +0000 (07:13 +0000)]
re PR tree-optimization/81303 (410.bwaves regression caused by r249919)

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

PR tree-optimization/81303
* tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
into account prologue and epilogue iterations when raising
min_profitable_iters to sth at least covering one vector iteration.

From-SVN: r250416

7 years agoarm.c (arm_test_cpu_arch_dat): Check for overlap.
Tamar Christina [Fri, 21 Jul 2017 06:46:05 +0000 (06:46 +0000)]
arm.c (arm_test_cpu_arch_dat): Check for overlap.

2017-07-21  Tamar Christina  <tamar.christina@arm.com>

* config/arm/arm.c (arm_test_cpu_arch_dat):
Check for overlap.

From-SVN: r250415

7 years agoRemove TYPE_METHODS.
Nathan Sidwell [Fri, 21 Jul 2017 00:27:51 +0000 (00:27 +0000)]
Remove TYPE_METHODS.

gcc/
Remove TYPE_METHODS.
* tree.h (TYPE_METHODS): Delete.
* dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
* dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
(dbxout_type_methods): Scan TYPE_FIELDS.
(dbxout_type): Don't check TYPE_METHODS here.
* function.c (use_register_for_decl): Always ignore register for
class types when not optimizing.
* ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
* tree.c (free_lang_data_in_type): Stitch out member functions and
templates from TYPE_FIELDS.
(build_distinct_type_copy, verify_type_variant,
verify_type): Member fns are on TYPE_FIELDS.
* tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
* tree-pretty-print.c (dump_generic_node): Likewise.

gcc/cp/
Remove TYPE_METHODS.
* class.c (maybe_warn_about_overly_private_class,
finish_struct_methods, one_inheriting_sig, count_fields,
add_fields_to_record_type, check_field_decls, check_methods,
clone_function_decl, set_method_tm_attributes,
finalize_literal_type_property, check_bases_and_members,
create_vtable_ptr, determine_key_method,
unreverse_member_declarations, finish_struct,
add_vcall_offset_vtbl_entries_1): Member fns are on TYPE_FIELDS.
* decl.c (fixup_anonymous_aggr): Likewise.
* decl2.c (reset_type_linkage_2): Likewise.
* method.c (after_nsdmi_defaulted_late_checks,
lazily_declare_fn): Likewise.
* optimize.c (maybe_thunk_body, maybe_clone_body): Likewise.
* pt.c (instantiate_class_template_1, tsubst_expr,
do_type_instantiation, instantiate_pending_templates): Likewise.
* search.c (lookup_field_1): Likewise.
* semantics.c (finish_member_declaration,
finish_omp_declare_simd_methods): Likewise.

gcc/c-family/
Remove TYPE_METHODS.
* c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
dump_ada_template, print_ada_methods,
print_ada_declaration): Member fns are on TYPE_FIELDS.

gcc/objc/
Remove TYPE_METHODS.
* objc-runtime-shared-support.c (build_ivar_list_initializer):
Don't presume first item is a FIELD_DECL.

gcc/testsuite/
* g++.dg/ext/anon-struct6.C: Adjust diag.
* g++.old-deja/g++.other/anon4.C: Adjust diag.

libcc1/
Remove TYPE_METHODS.
* libcp1plugin.cc (plugin_build_decl): Member fns are on TYPE_FIELDS.

From-SVN: r250413

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

From-SVN: r250412

7 years agocompiler: add explicit convert in Type_guard_expression::do_get_backend
Ian Lance Taylor [Thu, 20 Jul 2017 19:53:54 +0000 (19:53 +0000)]
compiler: add explicit convert in Type_guard_expression::do_get_backend

    The current recipe in Type_guard_expression for creating a Bexpression
    performs a type conversion at the Type level, but doesn't invoke
    Backend::convert_expression to capture the conversion for the back
    end. Add code to create a BE type conversion operation.

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

From-SVN: r250400

7 years agore PR target/80846 (auto-vectorized AVX2 horizontal sum should narrow to 128b right...
Jakub Jelinek [Thu, 20 Jul 2017 16:36:18 +0000 (18:36 +0200)]
re PR target/80846 (auto-vectorized AVX2 horizontal sum should narrow to 128b right away, to be more efficient for Ryzen and Intel)

PR target/80846
* config/i386/i386.c (ix86_expand_vector_init_general): Handle
V2TImode and V4TImode.
(ix86_expand_vector_extract): Likewise.
* config/i386/sse.md (VMOVE): Enable V4TImode even for just
TARGET_AVX512F, instead of only for TARGET_AVX512BW.
(ssescalarmode): Handle V4TImode and V2TImode.
(VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
(*vec_extractv2ti, *vec_extractv4ti): New insns.
(VEXTRACTI128_MODE): New mode iterator.
(splitter for *vec_extractv?ti first element): New.
(VEC_INIT_MODE): New mode iterator.
(vec_init<mode>): Consolidate 3 expanders into one using
VEC_INIT_MODE mode iterator.

* gcc.target/i386/avx-pr80846.c: New test.
* gcc.target/i386/avx2-pr80846.c: New test.
* gcc.target/i386/avx512f-pr80846.c: New test.

From-SVN: r250397

7 years agolra-assigns.c: fix pseudo_compare_func
Alexander Monakov [Thu, 20 Jul 2017 15:15:55 +0000 (18:15 +0300)]
lra-assigns.c: fix pseudo_compare_func

* lra-assigns.c (pseudo_compare_func): Fix comparison step based on
non_spilled_static_chain_regno_p.

From-SVN: r250395

7 years agogimple-ssa-store-merging.c: fix sort_by_bitpos
Alexander Monakov [Thu, 20 Jul 2017 15:13:56 +0000 (18:13 +0300)]
gimple-ssa-store-merging.c: fix sort_by_bitpos

* gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.

From-SVN: r250394

7 years agobb-reorder.c (connect_traces): Allow copying of blocks within single partition.
Jan Hubicka [Thu, 20 Jul 2017 14:27:41 +0000 (16:27 +0200)]
bb-reorder.c (connect_traces): Allow copying of blocks within single partition.

* bb-reorder.c (connect_traces): Allow copying of blocks within
single partition.

From-SVN: r250390

7 years agoMinor tweaks
Eric Botcazou [Thu, 20 Jul 2017 12:54:42 +0000 (12:54 +0000)]
Minor tweaks

From-SVN: r250386

7 years agogimple.h (gimple_phi_result): Add gphi * overload.
Richard Biener [Thu, 20 Jul 2017 12:37:14 +0000 (12:37 +0000)]
gimple.h (gimple_phi_result): Add gphi * overload.

2017-07-20  Richard Biener  <rguenther@suse.de>

* gimple.h (gimple_phi_result): Add gphi * overload.
(gimple_phi_result_ptr): Likewise.
(gimple_phi_arg): Likewise.  Adjust index assert to only
allow actual argument accesses rather than all slots available
by capacity.
(gimple_phi_arg_def): Add gphi * overload.
* tree-phinodes.c (make_phi_node): Initialize only actual
arguments.
(resize_phi_node): Clear memory not covered by old node,
do not initialize excess argument slots.
(reserve_phi_args_for_new_edge): Initialize new argument slot
completely.

From-SVN: r250385

7 years agore PR tree-optimization/81388 (Incorrect code generation with -O1)
Bin Cheng [Thu, 20 Jul 2017 12:02:19 +0000 (12:02 +0000)]
re PR tree-optimization/81388 (Incorrect code generation with -O1)

PR tree-optimization/81388
Revert r238585:
2016-07-21  Bin Cheng  <bin.cheng@arm.com>

* tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
by removing computation of may_be_zero.

gcc/testsuite
PR tree-optimization/81388
* gcc.dg/tree-ssa/pr81388-1.c: New test.
* gcc.dg/tree-ssa/pr81388-2.c: New test.

From-SVN: r250384

7 years agore PR middle-end/81030 (ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_f...
Jan Hubicka [Thu, 20 Jul 2017 11:27:31 +0000 (11:27 +0000)]
re PR middle-end/81030 (ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed)

PR middle-end/81030
* cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
when gimple level profile disagrees with what RTL expander did.
* gcc.dg/pr81030.c: New test.

From-SVN: r250383

7 years agore PR tree-optimization/61171 (vectorization fails for a reduction in presence of...
Richard Biener [Thu, 20 Jul 2017 11:17:21 +0000 (11:17 +0000)]
re PR tree-optimization/61171 (vectorization fails for a reduction in presence of subtraction)

2017-07-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/61171
* tree-vectorizer.h (slp_instance): Add reduc_phis member.
(vect_analyze_stmt): Add slp instance parameter.
(vectorizable_reduction): Likewise.
* tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
(vect_is_simple_reduction): Deal with chains not detected
as SLP reduction chain, specifically not properly associated
chains containing a mix of plus/minus.
(get_reduction_op): Remove.
(get_initial_defs_for_reduction): Simplify, pass in whether
this is a reduction chain, pass in the SLP node for the PHIs.
(vect_create_epilog_for_reduction): Get the SLP instance as
arg and adjust.
(vectorizable_reduction): Get the SLP instance as arg.
During analysis remember the SLP node with the PHIs in the
instance.  Simplify getting at the vectorized reduction PHIs.
* tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
through SLP instance.
(vect_slp_analyze_operations): Likewise.
* tree-vect-stms.c (vect_analyze_stmt): Likewise.
(vect_transform_stmt): Likewise.

* g++.dg/vect/pr61171.cc: New testcase.
* gfortran.dg/vect/pr61171.f: Likewise.
* gcc.dg/vect/vect-reduc-11.c: Likewise.

From-SVN: r250382

7 years agoslp-43.c: Increase loop count to enable vectorization with V64QImode.
Richard Biener [Thu, 20 Jul 2017 10:03:34 +0000 (10:03 +0000)]
slp-43.c: Increase loop count to enable vectorization with V64QImode.

2017-07-20  Richard Biener  <rguenther@suse.de>

* gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization
with V64QImode.
* gcc.dg/vect/slp-45.c: Likewise.

From-SVN: r250380

7 years agoFix phi arg location in find_implicit_erroneous_behavior
Tom de Vries [Thu, 20 Jul 2017 07:16:01 +0000 (07:16 +0000)]
Fix phi arg location in find_implicit_erroneous_behavior

2017-07-20  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/81489
* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
read of phi arg location to before loop that modifies phi.

From-SVN: r250378

7 years agomatch.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0): New pattern.
Naveen H.S [Thu, 20 Jul 2017 03:57:48 +0000 (03:57 +0000)]
match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0): New pattern.

gcc
* match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
New pattern.

gcc/testsuite
* gcc.dg/tree-ssa/vrp116.c: New Test.

From-SVN: r250377

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

From-SVN: r250376

7 years agore PR regression/81331 (missed Eh delivery in partitioned function)
Jan Hubicka [Wed, 19 Jul 2017 21:06:55 +0000 (23:06 +0200)]
re PR regression/81331 (missed Eh delivery in partitioned function)

PR middle-end/81331
* except.c (execute): Fix ordering issue.

From-SVN: r250370

7 years ago* math/powq.c (powq): Use uint32_t instead of u_int32_t.
Gerald Pfeifer [Wed, 19 Jul 2017 19:53:58 +0000 (19:53 +0000)]
* math/powq.c (powq): Use uint32_t instead of u_int32_t.

From-SVN: r250367

7 years agoPR libstdc++/81476 Optimise vector insertion from input iterators
Jonathan Wakely [Wed, 19 Jul 2017 19:32:15 +0000 (20:32 +0100)]
PR libstdc++/81476 Optimise vector insertion from input iterators

PR libstdc++/81476
* include/bits/vector.tcc (vector::_M_range_insert<_InputIterator>):
Only insert elements one-by-one when inserting at the end.
* testsuite/performance/23_containers/insert/81476.cc: New.

From-SVN: r250366

7 years agocombine: Fix for PR81423
Segher Boessenkool [Wed, 19 Jul 2017 19:31:26 +0000 (21:31 +0200)]
combine: Fix for PR81423

We here have an AND of a SUBREG of an LSHIFTRT.  If that SUBREG is
paradoxical, the extraction we form is the length of the size of the
inner mode, which includes some bits that should not be in the result.
Just give up in that case.

PR rtl-optimization/81423
* combine.c (make_compound_operation_int): Don't try to optimize
the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.

From-SVN: r250365

7 years agocpu-builtin-1.c: Change test to use #ifdef __BUILTIN_CPU_SUPPORTS to see if...
Michael Meissner [Wed, 19 Jul 2017 19:29:16 +0000 (19:29 +0000)]
cpu-builtin-1.c: Change test to use #ifdef __BUILTIN_CPU_SUPPORTS to see if...

2017-07-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/cpu-builtin-1.c: Change test to use #ifdef
__BUILTIN_CPU_SUPPORTS to see if the GLIBC is new enough that
__builtin_cpu_is and __builtin_cpu_supports are supported.

From-SVN: r250364

7 years agosimplify-rtx: The truncation of an IOR can have all bits set (PR81423)
Segher Boessenkool [Wed, 19 Jul 2017 19:28:41 +0000 (21:28 +0200)]
simplify-rtx: The truncation of an IOR can have all bits set (PR81423)

... if it is an IOR with a constant with all bits set in the mode
that is truncated to, for example.  Handle that case.

PR rtl-optimization/81423
* simplify-rtx.c (simplify_truncation): Handle truncating an IOR
with a constant that is -1 in the truncated to mode.

From-SVN: r250363

7 years agoFix up plafform testes in check headers.
Steven Munroe [Wed, 19 Jul 2017 19:04:50 +0000 (19:04 +0000)]
Fix up plafform testes in check headers.

Fix up plafform testes in check headers. After a resent GCC change
the previously submitted BMI/BMI2 intrinsic test started to fail
with a warning/error.

[gcc/testsuite]

2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>

* gcc.target/powerpc/bmi-check.h (main): Skip unless
__BUILTIN_CPU_SUPPORTS__ defined.
* gcc.target/powerpc/bmi2-check.h (main): Skip unless
__BUILTIN_CPU_SUPPORTS__ defined.

From-SVN: r250362

7 years agopredict.c (propagate_unlikely_bbs_forward): Break out from ...
Jan Hubicka [Wed, 19 Jul 2017 18:09:39 +0000 (18:09 +0000)]
predict.c (propagate_unlikely_bbs_forward): Break out from ...

* predict.c (propagate_unlikely_bbs_forward): Break out from ...
(determine_unlikely_bbs): ... here.
* predict.h (propagate_unlikely_bbs_forward): Declare.
* cfgexpand.c (pass_expand::execute): Use it.
* bb-reorder.c (sanitize_hot_paths): Do not consider known to be
unlikely edges.
(find_rarely_executed_basic_blocks_and_crossing_edges): Use
propagate_unlikely_bbs_forward.

From-SVN: r250360

7 years agopredict.c (propagate_unlikely_bbs_forward): Break out from ...
Jan Hubicka [Wed, 19 Jul 2017 18:08:53 +0000 (20:08 +0200)]
predict.c (propagate_unlikely_bbs_forward): Break out from ...

* predict.c (propagate_unlikely_bbs_forward): Break out from ...
(determine_unlikely_bbs): ... here.
* predict.h (propagate_unlikely_bbs_forward): Declare.
* cfgexpand.c (pass_expand::execute): Use it.
* bb-reorder.c (sanitize_hot_paths): Do not consider known to be
unlikely edges.
(find_rarely_executed_basic_blocks_and_crossing_edges): Use
propagate_unlikely_bbs_forward.

From-SVN: r250359

7 years agore PR regression/81331 (missed Eh delivery in partitioned function)
Jan Hubicka [Wed, 19 Jul 2017 18:08:07 +0000 (20:08 +0200)]
re PR regression/81331 (missed Eh delivery in partitioned function)

PR middle-end/81331
* except.c (maybe_add_nop_after_section_switch): New function.
(execute): Use it.

From-SVN: r250358

7 years agonew (bad_array_new_length): Remove redundant semicolon after in-class member function...
Volker Reichelt [Wed, 19 Jul 2017 16:59:00 +0000 (16:59 +0000)]
new (bad_array_new_length): Remove redundant semicolon after in-class member function definition.

        * libsupc++/new (bad_array_new_length): Remove redundant
        semicolon after in-class member function definition.
        * include/bits/locale_facets.h (ctype_byname, num_put): Likewise.
        * include/bits/locale_facets_nonio.h (time_put_byname): Likewise.
        * include/bits/random.h (mersenne_twister_engine): Likewise.
        * include/tr1/random.h (mersenne_twister): Likewise
        * include/ext/random (simd_fast_mersenne_twister_engine): Likewise.
        * include/ext/rope (char_producer, _Rope_char_consumer,
        _Rope_self_destruct_ptr, _Rope_const_iterator, _Rope_iterator):
        Likewise.
        * include/ext/ropeimpl.h (_Rope_flatten_char_consumer,
        _Rope_insert_char_consumer): Likewise.

From-SVN: r250357

7 years agoada-tree.h (TYPE_OBJECT_RECORD_TYPE, [...]): Use TYPE_MIN_VALUE_RAW instead of TYPE_M...
Jakub Jelinek [Wed, 19 Jul 2017 15:55:47 +0000 (17:55 +0200)]
ada-tree.h (TYPE_OBJECT_RECORD_TYPE, [...]): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.

* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
(TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.

From-SVN: r250355

7 years agoFix Unwind support on DragonFly BSD after sigtramp move
John Marino [Wed, 19 Jul 2017 15:55:11 +0000 (15:55 +0000)]
Fix Unwind support on DragonFly BSD after sigtramp move

2017-07-19  John Marino  <gnugcc@marino.st>

* config/i386/dragonfly-unwind.h: Handle sigtramp relocation.

From-SVN: r250354

7 years agoFix indentation in std::basic_filebuf member functions
Jonathan Wakely [Wed, 19 Jul 2017 15:46:04 +0000 (16:46 +0100)]
Fix indentation in std::basic_filebuf member functions

* include/bits/fstream.tcc (basic_filebuf::xsgetn)
(basic_filebuf::xsputn, basic_filebuf::seekoff): Fix indentation.

From-SVN: r250353

7 years agoFix assert in gimple_phi_set_arg
Tom de Vries [Wed, 19 Jul 2017 15:33:50 +0000 (15:33 +0000)]
Fix assert in gimple_phi_set_arg

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* gimple.h (gimple_phi_set_arg): Make assert more strict.

From-SVN: r250352

7 years agoFix assert in gimple_phi_arg
Tom de Vries [Wed, 19 Jul 2017 15:33:40 +0000 (15:33 +0000)]
Fix assert in gimple_phi_arg

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* gimple.h (gimple_phi_arg): Make assert more strict.

From-SVN: r250351

7 years agoNow adding the mmintrin.h intrinsic headers. The DG tests will follow.
Steven Munroe [Wed, 19 Jul 2017 15:24:42 +0000 (15:24 +0000)]
Now adding the mmintrin.h intrinsic headers. The DG tests will follow.

2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>

* config.gcc (powerpc*-*-*): Add mmintrin.h.
* config/rs6000/mmintrin.h: New file.
* config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.

From-SVN: r250350

7 years agoFix indentation in libstdc++ testsuite utils
Jonathan Wakely [Wed, 19 Jul 2017 14:49:00 +0000 (15:49 +0100)]
Fix indentation in libstdc++ testsuite utils

* testsuite/util/testsuite_iterators.h: Fix indentation.

From-SVN: r250349

7 years agoclass.c (add_implicitly_declared_members): Use classtype_has_move_assign_or_move_ctor_p.
Nathan Sidwell [Wed, 19 Jul 2017 13:28:21 +0000 (13:28 +0000)]
class.c (add_implicitly_declared_members): Use classtype_has_move_assign_or_move_ctor_p.

* class.c (add_implicitly_declared_members): Use
classtype_has_move_assign_or_move_ctor_p.
(classtype_has_move_assign_or_move_ctor,
classtype_has_user_move_assign_or_move_ctor_p): Merge into ...
(classtype_has_move_assign_or_move_ctor_p): ... this new function.
* cp-tree.h (classtype_has_user_move_assign_or_move_ctor_p):
Replace with ...
(classtype_has_move_assign_or_move_ctor_p): ... this.
* method.c (maybe_explain_implicit_delete, lazily_declare_fn): Adjust.
* tree.c (type_has_nontrivial_copy_init): Adjust.

From-SVN: r250344

7 years agore PR libquadmath/65757 (gfortran gives incorrect result for anint with real*16 argument)
Jakub Jelinek [Wed, 19 Jul 2017 13:12:58 +0000 (15:12 +0200)]
re PR libquadmath/65757 (gfortran gives incorrect result for anint with real*16 argument)

PR libquadmath/65757
* quadmath-imp.h (math_opt_barrier, math_force_eval,
math_narrow_eval, math_check_force_underflow,
math_check_force_underflow_nonneg): Define.
* math/ceilq.c: Backport changes from upstream glibc
between 2012-11-01 and 2017-07-13.
* math/remquoq.c: Likewise.
* math/expq.c: Likewise.
* math/llroundq.c: Likewise.
* math/logq.c: Likewise.
* math/atanq.c: Likewise.
* math/nearbyintq.c: Likewise.
* math/scalblnq.c: Likewise.
* math/finiteq.c: Likewise.
* math/atanhq.c: Likewise.
* math/expm1q.c: Likewise.
* math/sinhq.c: Likewise.
* math/log10q.c: Likewise.
* math/rintq.c: Likewise.
* math/roundq.c: Likewise.
* math/fmaq.c: Likewise.
* math/erfq.c: Likewise.
* math/log2q.c: Likewise.
* math/lroundq.c: Likewise.
* math/j1q.c: Likewise.
* math/scalbnq.c: Likewise.
* math/truncq.c: Likewise.
* math/frexpq.c: Likewise.
* math/sincosq.c: Likewise.
* math/tanhq.c: Likewise.
* math/asinq.c: Likewise.
* math/coshq.c: Likewise.
* math/j0q.c: Likewise.
* math/asinhq.c: Likewise.
* math/floorq.c: Likewise.
* math/sinq_kernel.c: Likewise.
* math/powq.c: Likewise.
* math/hypotq.c: Likewise.
* math/sincos_table.c: Likewise.
* math/rem_pio2q.c: Likewise.
* math/nextafterq.c: Likewise.
* math/log1pq.c: Likewise.
* math/sincosq_kernel.c: Likewise.
* math/tanq.c: Likewise.
* math/acosq.c: Likewise.
* math/lrintq.c: Likewise.
* math/llrintq.c: Likewise.

From-SVN: r250343

7 years agore PR tree-optimization/81346 (Missed constant propagation into comparison)
Jakub Jelinek [Wed, 19 Jul 2017 13:10:05 +0000 (15:10 +0200)]
re PR tree-optimization/81346 (Missed constant propagation into comparison)

PR tree-optimization/81346
* match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.

* gcc.dg/tree-ssa/pr81346-5.c: New test.

From-SVN: r250342

7 years agoAdd v2di support for nvptx
Tom de Vries [Wed, 19 Jul 2017 13:05:35 +0000 (13:05 +0000)]
Add v2di support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* config/nvptx/nvptx-modes.def: Add V2DImode.
* config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
(nvptx_output_mov_insn): Handle lack of mov.b128.
(nvptx_print_operand): Handle 'H' and 'L' codes.
(nvptx_vector_mode_supported): Allow V2DImode.
(nvptx_preferred_simd_mode): New function.
(nvptx_data_alignment): New function.
(TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
nvptx_preferred_simd_mode.
* config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
64 to 128 bits.
(DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.

* config/nvptx/nvptx.md (VECIM): Add V2DI.

* gcc.target/nvptx/decl-init.c: Update alignment.
* gcc.target/nvptx/slp-2-run.c: New test.
* gcc.target/nvptx/slp-2.c: New test.
* gcc.target/nvptx/v2di.c: New test.

* testsuite/libgomp.oacc-c/vec.c: New test.

From-SVN: r250341

7 years agoAdd v2si support for nvptx
Tom de Vries [Wed, 19 Jul 2017 13:05:21 +0000 (13:05 +0000)]
Add v2si support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
(nvptx_vector_mode_supported): New function.  Allow V2SImode.
(TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
* config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
(mov<VECIM>_insn): New define_insn.
(define_expand "mov<VECIM>): New define_expand.

* gcc.target/nvptx/slp-run.c: New test.
* gcc.target/nvptx/slp.c: New test.
* gcc.target/nvptx/v2si-cvt.c: New test.
* gcc.target/nvptx/v2si-run.c: New test.
* gcc.target/nvptx/v2si.c: New test.
* gcc.target/nvptx/vec.inc: New test.

From-SVN: r250340

7 years agoAdd generic v2 vector mode support for nvptx
Tom de Vries [Wed, 19 Jul 2017 13:05:09 +0000 (13:05 +0000)]
Add generic v2 vector mode support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.

From-SVN: r250339

7 years agore PR tree-optimization/81346 (Missed constant propagation into comparison)
Jakub Jelinek [Wed, 19 Jul 2017 12:31:59 +0000 (14:31 +0200)]
re PR tree-optimization/81346 (Missed constant propagation into comparison)

PR tree-optimization/81346
* fold-const.h (fold_div_compare, range_check_type): Declare.
* fold-const.c (range_check_type): New function.
(build_range_check): Use range_check_type.
(fold_div_compare): No longer static, rewritten into
a match.pd helper function.
(fold_comparison): Don't call fold_div_compare here.
* match.pd (X / C1 op C2): New optimization using fold_div_compare
as helper function.

* gcc.dg/tree-ssa/pr81346-1.c: New test.
* gcc.dg/tree-ssa/pr81346-2.c: New test.
* gcc.dg/tree-ssa/pr81346-3.c: New test.
* gcc.dg/tree-ssa/pr81346-4.c: New test.
* gcc.target/i386/umod-3.c: Hide comparison against 1 from the
compiler to avoid X / C1 op C2 optimization to trigger.

From-SVN: r250338

7 years agotree.h (TYPE_MINVAL, [...]): Rename to ...
Nathan Sidwell [Wed, 19 Jul 2017 12:01:18 +0000 (12:01 +0000)]
tree.h (TYPE_MINVAL, [...]): Rename to ...

gcc/
* tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
(TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
* tree.c (find_decls_types_r, verify_type): Use
TYPE_{MIN,MAX}_VALUE_RAW.
* lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
(hash_tree): Likewise.
* tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
Likewise.
* tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
Likewise.

gcc/cp/
* cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS,
PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW.

gcc/lto/
* lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
(compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.

gcc/objc/
* objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use
TYPE_{MIN,MAX}_VALUE_RAW.

From-SVN: r250337

7 years agoFix an UBSAN test-case (PR sanitizer/63361).
Martin Liska [Wed, 19 Jul 2017 06:50:34 +0000 (08:50 +0200)]
Fix an UBSAN test-case (PR sanitizer/63361).

2017-07-19  Martin Liska  <mliska@suse.cz>

PR sanitizer/63361
* c-c++-common/ubsan/float-cast-overflow-1.c: Add either
-ffloat-store or -mieee for targets that need it.

From-SVN: r250336

7 years agoHandle equal-argument loop exit phi in expand_omp_for_static_chunk
Tom de Vries [Wed, 19 Jul 2017 06:25:40 +0000 (06:25 +0000)]
Handle equal-argument loop exit phi in expand_omp_for_static_chunk

2017-07-18  Tom de Vries  <tom@codesourcery.com>

PR middle-end/81464
* omp-expand.c (expand_omp_for_static_chunk): Handle equal-argument loop
exit phi.

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

From-SVN: r250335

7 years agoAdd myself to MAINTAINERS.
Yury Gribov [Wed, 19 Jul 2017 05:25:47 +0000 (05:25 +0000)]
Add myself to MAINTAINERS.

From-SVN: r250334

7 years agoUse dg-require-fileio in new test
Jonathan Wakely [Wed, 19 Jul 2017 00:23:00 +0000 (01:23 +0100)]
Use dg-require-fileio in new test

* testsuite/27_io/basic_filebuf/sgetn/char/81395.cc: Add dg-require.

From-SVN: r250333

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

From-SVN: r250332

7 years agoPR libstdc++/81395 fix crash when write follows large read
Jonathan Wakely [Tue, 18 Jul 2017 23:39:34 +0000 (00:39 +0100)]
PR libstdc++/81395 fix crash when write follows large read

PR libstdc++/81395
* include/bits/fstream.tcc (basic_filebuf::xsgetn): Don't set buffer
pointers for write mode after reading.
* testsuite/27_io/basic_filebuf/sgetn/char/81395.cc: New.

From-SVN: r250328

7 years agocompiler: insert backend type conversion for closure func ptr
Ian Lance Taylor [Tue, 18 Jul 2017 23:29:15 +0000 (23:29 +0000)]
compiler: insert backend type conversion for closure func ptr

    In Func_expression::do_get_backend when creating the backend
    representation for a closure, create a backend type conversion to
    account for potential differences between the closure struct type
    (where the number of fields is dependent on the number of values
    referenced in the closure) and the generic function descriptor type
    (struct with single function pointer field).

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

From-SVN: r250327

7 years agore PR go/81451 (missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13...
Ian Lance Taylor [Tue, 18 Jul 2017 23:14:29 +0000 (23:14 +0000)]
re PR go/81451 (missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’)

PR go/81451
    runtime: inline runtime_osinit

    We had two identical copies of runtime_osinit. They set runtime_ncpu,
    a variable that is no longer used. Removing that leaves us with two lines.
    Inline those two lines in the two places the function was called.

    This fixes GCC PR 81451.

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

From-SVN: r250326

7 years agocompiler: pass correct 'function' flag to circular_pointer_type
Ian Lance Taylor [Tue, 18 Jul 2017 22:31:00 +0000 (22:31 +0000)]
compiler: pass correct 'function' flag to circular_pointer_type

    The code in Named_type::do_get_backend was not passing the correct
    flag value for circular function types to Backend::circular_pointer_type
    (it was always setting this flag to false). Pass a true value if the
    type being converted is a function type.

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

From-SVN: r250325

7 years agore PR go/81324 (libgo does not build with glibc 2.18)
Ian Lance Taylor [Tue, 18 Jul 2017 22:06:31 +0000 (22:06 +0000)]
re PR go/81324 (libgo does not build with glibc 2.18)

PR go/81324
    sysinfo.c: ignore ptrace_peeksiginfo_args from <linux/ptrace.h>

    With some versions of glibc and GNU/Linux ptrace_pseeksiginfo_args is
    defined in both <sys/ptrace.h> and <linux/ptrace.h>. We don't actually
    care about the struct, so use a #define to avoid a redefinition error.

    This fixes https://gcc.gnu.org/PR81324.

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

From-SVN: r250324

7 years agoupdate my entry in MAINTAINERS
Trevor Saunders [Tue, 18 Jul 2017 21:05:48 +0000 (21:05 +0000)]
update my entry in MAINTAINERS

/:

* MAINTAINERS: Update my email address.

From-SVN: r250321

7 years agostl_list.h (struct _List_node_header): New.
François Dumont [Tue, 18 Jul 2017 20:26:08 +0000 (20:26 +0000)]
stl_list.h (struct _List_node_header): New.

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

* include/bits/stl_list.h
(struct _List_node_header): New.
(_List_impl()): Fix noexcept qualification.
(_List_impl(_List_impl&&)): New, default.
(_List_base()): Default.
(_List_base(_List_base&&)): Default.
(_List_base::_M_move_nodes): Adapt to use
_List_node_header._M_move_nodes.
(_List_base::_M_init): Likewise.
(list<>()): Default.
(list<>(list&&)): Default.
(list<>::_M_move_assign(list&&, true_type)): Use _M_move_nodes.
(__distance(_List_const_iterator<>, _List_const_iterator<>,
input_iterator_tag)): Adapt.
* testsuite/23_containers/list/allocator/default_init.cc: New.

From-SVN: r250320

7 years agore PR target/81471 (internal compiler error: in curr_insn_transform, at lra-constrain...
Uros Bizjak [Tue, 18 Jul 2017 16:10:20 +0000 (18:10 +0200)]
re PR target/81471 (internal compiler error: in curr_insn_transform, at lra-constraints.c:3495)

PR target/81471
* config/i386/i386.md (rorx_immediate_operand): New mode attribute.
(*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
operand 2 predicate.
(*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
operand 2 predicate.
(ror,rol -> rorx splitters): Use const_int_operand as
operand 2 predicate.

testsuite/ChangeLog:

PR target/81471
* gcc.target/i386/pr81471.c: New test.

From-SVN: r250315

7 years agomklog: Fix extraction of changed file name.
Yury Gribov [Tue, 18 Jul 2017 15:39:39 +0000 (15:39 +0000)]
mklog: Fix extraction of changed file name.

2017-07-17  Yury Gribov  <tetra2005@gmail.com>

* mklog: Fix extraction of changed file name.

From-SVN: r250314

7 years agore PR tree-optimization/81410 (-O3 breaks code)
Richard Biener [Tue, 18 Jul 2017 13:55:47 +0000 (13:55 +0000)]
re PR tree-optimization/81410 (-O3 breaks code)

2017-06-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81410
* tree-vect-stmts.c (vectorizable_load): Properly adjust for
the gap in the ! slp_perm SLP case after each group.

* gcc.dg/vect/pr81410.c: New testcase.

From-SVN: r250312

7 years agore PR tree-optimization/81463 (ICE in scale_loop_profile at gcc/cfgloopmanip.c:603)
Jan Hubicka [Tue, 18 Jul 2017 13:51:22 +0000 (15:51 +0200)]
re PR tree-optimization/81463 (ICE in scale_loop_profile at gcc/cfgloopmanip.c:603)

PR middle-end/81463
* cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
again.

From-SVN: r250311

7 years agore PR tree-optimization/81462 (ICE in estimate_bb_frequencies at gcc/predict.c:3546)
Jan Hubicka [Tue, 18 Jul 2017 13:49:30 +0000 (15:49 +0200)]
re PR tree-optimization/81462 (ICE in estimate_bb_frequencies at gcc/predict.c:3546)

PR middle-end/81462
* predict.c (set_even_probabilities): Cleanup; do not affect
probabilities that are already known.
(combine_predictions_for_bb): Call even when count is set.

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

From-SVN: r250310

7 years agotree-parloops.c (try_transform_to_exit_first_loop_alt): Use TYPE_MAX_VALUE.
Nathan Sidwell [Tue, 18 Jul 2017 13:22:50 +0000 (13:22 +0000)]
tree-parloops.c (try_transform_to_exit_first_loop_alt): Use TYPE_MAX_VALUE.

       gcc/
* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
TYPE_MAX_VALUE.

       gcc/c-family/
* c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.

       gcc/c/
* c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.

       gcc/cp/
* cp-array-notation.c (build_array_notation_ref): Use
TYPE_{MIN,MAX}_VALUE.

       gcc/fortran/
* trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.

From-SVN: r250309

7 years agogcc: ada: delete old $(P) reference
Mike Frysinger [Tue, 18 Jul 2017 12:38:41 +0000 (12:38 +0000)]
gcc: ada: delete old $(P) reference

The P variable was deleted back in Nov 2015 (svn rev 231062),
but its expansion was missed.  Delete those now too.

From-SVN: r250307

7 years agoclass.c (classtype_has_move_assign_or_move_ctor): Declare.
Nathan Sidwell [Tue, 18 Jul 2017 12:05:12 +0000 (12:05 +0000)]
class.c (classtype_has_move_assign_or_move_ctor): Declare.

* class.c (classtype_has_move_assign_or_move_ctor): Declare.
(add_implicitly_declared_members): Use it.
(type_has_move_constructor, type_has_move_assign): Merge into ...
(classtype_has_move_assign_or_move_ctor): ... this new function.
* cp-tree.h (type_has_move_constructor, type_has_move_assign): Delete.

From-SVN: r250305

7 years agore PR middle-end/81408 (Lots of new -Wunsafe-loop-optimizations warnings with 7 compa...
Bin Cheng [Tue, 18 Jul 2017 11:40:38 +0000 (11:40 +0000)]
re PR middle-end/81408 (Lots of new -Wunsafe-loop-optimizations warnings with 7 compared to 6)

PR target/81408
* tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
optimization for loop niter analysis.

gcc/testsuite
* g++.dg/tree-ssa/pr81408.C: New.
* gcc.dg/tree-ssa/pr19210-1.c: Check dump message rather than warning.

From-SVN: r250304

7 years agore PR target/81473 ([avr] build fails due to INT8_MIN and friends.)
Georg-Johann Lay [Tue, 18 Jul 2017 09:36:21 +0000 (09:36 +0000)]
re PR target/81473 ([avr] build fails due to INT8_MIN and friends.)

gcc/
PR target/81473
* config/avr/avr.c (avr_optimize_casesi): Don't use
INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.

From-SVN: r250301

7 years agoFix PR81362: Vector peeling
Robin Dapp [Tue, 18 Jul 2017 09:23:35 +0000 (09:23 +0000)]
Fix PR81362: Vector peeling

npeel was erroneously overwritten by vect_peeling_hash_get_lowest_cost
although the corresponding dataref is not used afterwards.  It should
be safe to get rid of the npeel parameter since we use the returned
peeling_info's npeel anyway.  Also removed the body_cost_vec parameter
which is not used elsewhere.

gcc/ChangeLog:

2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>

* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
body_cost_vec from _vect_peel_extended_info.
(vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
(vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
npeel.

From-SVN: r250300

7 years ago* config/arm/arm.c (emit_unlikely_jump): Remove unused var.
Bin Cheng [Tue, 18 Jul 2017 08:34:37 +0000 (08:34 +0000)]
* config/arm/arm.c (emit_unlikely_jump): Remove unused var.

From-SVN: r250299

7 years agore PR tree-optimization/80620 (gcc produces wrong code with -O3)
Richard Biener [Tue, 18 Jul 2017 07:35:40 +0000 (07:35 +0000)]
re PR tree-optimization/80620 (gcc produces wrong code with -O3)

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

PR tree-optimization/80620
PR tree-optimization/81403
* tree-ssa-pre.c (phi_translate_1): Clear range and points-to
info when re-using a VN table entry.

* gcc.dg/torture/pr80620.c: New testcase.
* gcc.dg/torture/pr81403.c: Likewise.

From-SVN: r250297

7 years agore PR tree-optimization/81418 (ICE in vect_get_vec_def_for_stmt_copy)
Richard Biener [Tue, 18 Jul 2017 07:26:04 +0000 (07:26 +0000)]
re PR tree-optimization/81418 (ICE in vect_get_vec_def_for_stmt_copy)

2017-06-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81418
* tree-vect-loop.c (vectorizable_reduction): Properly compute
vectype_in.  Verify that with lane-reducing reduction operations
we have a single def-use cycle.

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

From-SVN: r250296

7 years agoRevert commit r249424 2017-06-20 Carl Love <cel@us.ibm.com>
Carl Love [Tue, 18 Jul 2017 03:40:39 +0000 (03:40 +0000)]
Revert commit r249424 2017-06-20 Carl Love <cel@us.ibm.com>

gcc/ChangeLog:

2017-07-17  Carl Love  <cel@us.ibm.com>

Revert commit r249424 2017-06-20  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
* config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
VMULOSW): New enum "unspec" values.
(vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
altivec_vmulosw): New patterns.
* config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
VMULOSW): Add definitions.

gcc/testsuite/ChangeLog:

2017-07-17  Carl Love  <cel@us.ibm.com>

Revert commit r249572  2017-06-22 Carl Love  <cel@us.ibm.com>
test case changes for commit 249424

* gcc.target/powerpc/builtins-2.c (vmulosh, vmulouh, vmulesh,
vmuleuh): Fix scan-assembler-times should check for word not half word
instructions.

From-SVN: r250295

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

From-SVN: r250294

7 years agoalpha.c: Include predict.h.
Uros Bizjak [Mon, 17 Jul 2017 20:54:31 +0000 (22:54 +0200)]
alpha.c: Include predict.h.

* config/alpha/alpha.c: Include predict.h.

From-SVN: r250290

7 years agore PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR)
Bill Schmidt [Mon, 17 Jul 2017 19:12:11 +0000 (19:12 +0000)]
re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR)

2017-07-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/81162
* gcc.dg/pr81162.c: Move this to...
* gcc.dg/ubsan/pr81162.c: ...here.

From-SVN: r250284

7 years agoparser.c (cp_parser_decl_specifier_seq): Add fix-it hints for friend outside class...
Volker Reichelt [Mon, 17 Jul 2017 16:58:00 +0000 (16:58 +0000)]
parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for friend outside class and obsolete auto as...

        * parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for
        friend outside class and obsolete auto as storage-class-specifier.

        * g++.dg/diagnostic/friend1.C: New test.
        * g++.dg/cpp0x/auto1.C: Add check for fix-it hint.

From-SVN: r250282

7 years agoclass.c (maybe_warn_about_overly_private_class): Ignore public copy ctors.
Nathan Sidwell [Mon, 17 Jul 2017 16:52:31 +0000 (16:52 +0000)]
class.c (maybe_warn_about_overly_private_class): Ignore public copy ctors.

* class.c (maybe_warn_about_overly_private_class): Ignore public
copy ctors.

* g++.dg/warn/ctor-dtor-privacy-3.C: New.

From-SVN: r250281