1. 18 Dec, 2017 10 commits
    • [PR c++/59930] template friend injection · 02c7dd78
      https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01168.html
      	PR c++/59930
      	* name-lookup.c (name_lookup::search_unqualified): Don't search
      	parent namespace when looking for hidden things.
      	* pt.c (tsubst_friend_class): Always push to friend scope, drop
      	unneeded self-friend check. Inject new hidden friend into correct
      	scope.
      
      	PR c++/59930
      	* g++.dg/parse/pr81247-c.C: Adjust.
      	* g++.dg/template/pr59930-[123].C: New.
      
      From-SVN: r255780
      Nathan Sidwell committed
    • [ARC] Update (u)maddsidi patterns. · 0cf0bc67
      The accumulator registers are freely used by the compiler. However,
      there are a number of instructions which are having an intrinsic use
      of these registers. Update patterns to inform the compiler which ones.
      
      gcc/
      2017-09-19  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern.
      	(umaddsidi4,umaddsidi4): Likewise.
      
      gcc/testsuite
      2017-09-19  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/tumaddsidi4.c: New test.
      
      From-SVN: r255779
      Claudiu Zissulescu committed
    • [ARC] Update legitimate constant hook. · 2bd36eba
      Make sure we check the constants in all cases.
      
      gcc/
      2017-10-14  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (arc_legitimate_constant_p): Always check all
      	constants.
      
      testsuite/
      2017-10-14  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/tls-1.c: New test.
      
      From-SVN: r255778
      Claudiu Zissulescu committed
    • S/390: PR83420: Improve hotpatch option parsing. · 4aeba1b7
      With the attached patch we get rid of the following build failure:
      
      /home/andreas/build/../gcc/gcc/config/s390/s390.c: In function ‘void
      s390_option_override()’:
      /home/andreas/build/../gcc/gcc/config/s390/s390.c:15361:16: error: ‘char*
      strncpy(char*, const char*, size_t)’ specified bound 256 equals destination
      size [-Werror=stringop-truncation]
              strncpy (s, opt->arg, 256);
              ~~~~~~~~^~~~~~~~~~~~~~~~~~
      
      gcc/ChangeLog:
      
      2017-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	PR target/83420
      	* config/s390/s390.c (s390_option_override): Avoid strncpy.
      
      From-SVN: r255777
      Andreas Krebbel committed
    • re PR ipa/81877 (Incorrect results with lto and -fipa-cp and -fipa-cp-clone) · bcfaa720
      2017-12-18  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/81877
      	* tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters.
      	(outermost_indep_loop): Adjust.
      	(ref_indep_loop_p_1): Likewise.  Remove safelen handling again.
      	(can_sm_ref_p): Adjust.
      
      	* g++.dg/torture/pr81877.C: New testcase.
      	* g++.dg/vect/pr70729.cc: XFAIL.
      	* g++.dg/vect/pr70729-nest.cc: XFAIL.
      
      From-SVN: r255776
      Richard Biener committed
    • re PR tree-optimization/77291 (False positive for -Warray-bounds) · 8c3563f3
      2017-12-18  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/77291
      	* tree.c (array_at_struct_end_p): Return true if the underlying
      	object has space for at least one element in excess of what
      	the array domain specifies.
      
      	* gcc.dg/Warray-bounds-26.c: New testcase.
      
      From-SVN: r255775
      Richard Biener committed
    • extend.texi (x86 Function Attributes): Reformat nocf_check example to avoid overfull hbox. · 040a4493
      2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/extend.texi (x86 Function Attributes): Reformat nocf_check
      	example	to avoid overfull hbox.
      	* doc/invoke.texi (Option Summary): Add missing @gol.
      	(C++ Dialect Options): Reformat -Wnoexcept-type example to avoid 
      	overfull hbox.
      
      From-SVN: r255774
      Sandra Loosemore committed
    • invoke.texi (Option Summary): Add -mverbose-cost-dump to AArch64 and ARM lists,… · 23f504aa
      invoke.texi (Option Summary): Add -mverbose-cost-dump to AArch64 and ARM lists, plus missing -mflip-thumb for ARM.
      
      2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
      	    Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
      
      	gcc/
      	* doc/invoke.texi (Option Summary): Add -mverbose-cost-dump
      	to AArch64 and ARM lists, plus missing -mflip-thumb for ARM.
      	(AArch64 Options): Document -mverbose-cost-dump.
      	(ARM Options): Likewise, plus -mflip-thumb.
      
      Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
      
      From-SVN: r255773
      Sandra Loosemore committed
    • PR bootstrap/83446 - Bootstrap failed on i686 · 56735d40
      gcc/testsuite/ChangeLog:
      
      	PR bootstrap/83446
      	* c-c++-common/Warray-bounds-3.c: Adjust.
      	* gcc.dg/Warray-bounds-25.c: New test.
      
      gcc/ChangeLog:
      
      	PR bootstrap/83446
      	* gimple-ssa-warn-restrict.c
      	(builtin_memref::offset_out_of_bounds): Correct the handling of
      	anti-ranges.
      
      From-SVN: r255772
      Martin Sebor committed
    • Daily bump. · bfecb9de
      From-SVN: r255771
      GCC Administrator committed
  2. 17 Dec, 2017 9 commits
  3. 16 Dec, 2017 17 commits
    • PR tree-optimization/78918 - missing -Wrestrict on memcpy copying over self · cc8bea0a
      gcc/c-family/ChangeLog:
      
      	PR tree-optimization/78918
      	* c-common.c (check_function_restrict): Avoid checking built-ins.
      	* c.opt (-Wrestrict): Include in -Wall.
      
      gcc/ChangeLog:
      
      	PR tree-optimization/78918
      	* Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
      	* builtins.c (check_sizes): Rename...
      	(check_access): ...to this.  Rename function arguments for clarity.
      	(check_memop_sizes): Adjust names.
      	(expand_builtin_memchr, expand_builtin_memcpy): Same.
      	(expand_builtin_memmove, expand_builtin_mempcpy): Same.
      	(expand_builtin_strcat, expand_builtin_stpncpy): Same.
      	(check_strncat_sizes, expand_builtin_strncat): Same.
      	(expand_builtin_strncpy, expand_builtin_memset): Same.
      	(expand_builtin_bzero, expand_builtin_memcmp): Same.
      	(expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
      	(maybe_emit_sprintf_chk_warning): Same.
      	(expand_builtin_strcpy): Adjust.
      	(expand_builtin_stpcpy): Same.
      	(expand_builtin_with_bounds): Detect out-of-bounds accesses
      	in pointer-checking forms of memcpy, memmove, and mempcpy.
      	(gcall_to_tree_minimal, max_object_size): Define new functions.
      	* builtins.h (max_object_size): Declare.
      	* calls.c (alloc_max_size): Call max_object_size instead of
      	hardcoding ssizetype limit.
      	(get_size_range): Handle new argument.
      	* calls.h (get_size_range): Add a new argument.
      	* cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
      	* doc/invoke.texi (-Wrestrict): Adjust, add example.
      	* gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
      	operations.
      	(gimple_fold_builtin_memory_chk): Same.
      	(gimple_fold_builtin_stxcpy_chk): New function.
      	* gimple-ssa-warn-restrict.c: New source.
      	* gimple-ssa-warn-restrict.h: New header.
      	* gimple.c (gimple_build_call_from_tree): Propagate location.
      	* passes.def (pass_warn_restrict): Add new pass.
      	* tree-pass.h (make_pass_warn_restrict): Declare.
      	* tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
      	operations.
      	(handle_builtin_strcat): Same.
      	(strlen_optimize_stmt): Rename...
      	(strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
      	stpncpy, strncpy, and their checking forms.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/78918
      	* c-c++-common/Warray-bounds.c: New test.
      	* c-c++-common/Warray-bounds-2.c: New test.
      	* c-c++-common/Warray-bounds-3.c: New test.
      	* c-c++-common/Warray-bounds-4.c: New test.
      	* c-c++-common/Warray-bounds-5.c: New test.
      	* c-c++-common/Wrestrict-2.c: New test.
      	* c-c++-common/Wrestrict.c: New test.
      	* c-c++-common/Wrestrict.s: New test.
      	* c-c++-common/Wsizeof-pointer-memaccess1.c: Adjust
      	* c-c++-common/Wsizeof-pointer-memaccess2.c: Same.
      	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same.
      	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Same.
      	* gcc.dg/range.h: New header.
      	* gcc.dg/memcpy-6.c: New test.
      	* gcc.dg/pr69172.c: Adjust.
      	* gcc.dg/pr79223.c: Same.
      	* gcc.dg/pr81345.c: Adjust.
      	* gcc.dg/Wobjsize-1.c: Same.
      	* gcc.dg/Wrestrict-2.c: New test.
      	* gcc.dg/Wrestrict.c: New test.
      	* gcc.dg/Wsizeof-pointer-memaccess1.c: Adjust.
      	* gcc.dg/builtin-stpncpy.c: Same.
      	* gcc.dg/builtin-stringop-chk-1.c: Same.
      	* gcc.target/i386/chkp-stropt-17.c: New test.
      	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Adjust.
      
      From-SVN: r255755
      Martin Sebor committed
    • PR tree-optimization/83239 - False positive from -Wstringop-overflow · d4356822
      PR tree-optimization/83239 - False positive from -Wstringop-overflow
      on simple std::vector code
      
      libstdc++/CHangeLog:
      	* include/bits/vector.tcc (vector::_M_default_append): Assert
              invariant to generate better code.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/pr83239.C: New test case.
      
      From-SVN: r255753
      Martin Sebor committed
    • re PR libfortran/81937 (stack-buffer-overflow on memcpy in libgfortran/io/unix.c… · 1eaa31d8
      re PR libfortran/81937 (stack-buffer-overflow on memcpy in libgfortran/io/unix.c on character(kind=4))
      
      2017-12-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
              PR libgfortran/81937
              * io/list_read.c (next_char_internal): Don't attempt to read
              from the internal unit stream if no bytes are left. Decrement
              bytes_left in the right place.
      
      From-SVN: r255750
      Jerry DeLisle committed
    • re PR target/82767 (gcc.target/i386/pr71321.c scan-assembler-times fail) · c16c06da
      	PR testsuite/82767
      	 * gcc.target/i386/pr71321.c: Test with -mtune=generic
      
      From-SVN: r255749
      Sebastian Peryt committed
    • re PR rtl-optimization/82849 (ICE on valid code since r254379) · a9007865
      2017-12-16  Jan Hubicka  <hubicka@ucw.cz>
      
      	PR rtl-optimization/82849
      	* modulo-sched.c (sms_schedule): Use get_estimated_loop_iterations_int
      	and get_max_loop_iterations_int.
      
      From-SVN: r255748
      Jan Hubicka committed
    • poly_int: mode query functions · b4d43553
      This patch changes the bit size and vector count arguments to the
      machmode.h functions from unsigned int to poly_uint64.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
      	(smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
      	size as a poly_uint64.
      	(mode_for_vector, mode_for_int_vector): Take the number of vector
      	elements as a poly_uint64.
      	* stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
      	size as a poly_uint64.
      	(mode_for_vector, mode_for_int_vector): Take the number of vector
      	elements as a poly_uint64.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255747
      Richard Sandiford committed
    • Revert accidental commit · b4ddce36
      From-SVN: r255746
      Richard Sandiford committed
    • Add a gen_int_shift_amount helper function · 7e594332
      This patch adds a helper routine that constructs rtxes
      for constant shift amounts, given the mode of the value
      being shifted.  As well as helping with the SVE patches, this
      is one step towards allowing CONST_INTs to have a real mode.
      
      One long-standing problem has been to decide what the mode
      of a shift count should be for arbitrary rtxes (as opposed to those
      directly tied to a target pattern).  Realistic choices would be
      the mode of the shifted elements, word_mode, QImode, or the same
      mode as the shift optabs (in which case what should the mode
      be when the target doesn't have a pattern?)
      
      For now the patch picks the mode of the shifted elements,
      but with a ??? comment.
      
      2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* emit-rtl.h (gen_int_shift_amount): Declare.
      	* emit-rtl.c (gen_int_shift_amount): New function.
      	* asan.c (asan_emit_stack_protection): Use gen_int_shift_amount
      	instead of GEN_INT.
      	* calls.c (shift_return_value): Likewise.
      	* cse.c (fold_rtx): Likewise.
      	* dse.c (find_shift_sequence): Likewise.
      	* expmed.c (init_expmed_one_mode, store_bit_field_1, expand_shift_1)
      	(expand_shift, expand_smod_pow2): Likewise.
      	* lower-subreg.c (shift_cost): Likewise.
      	* optabs.c (expand_superword_shift, expand_doubleword_mult)
      	(expand_unop, expand_binop, shift_amt_for_vec_perm_mask)
      	(expand_vec_perm_var): Likewise.
      	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
      	(simplify_binary_operation_1): Likewise.
      	* combine.c (try_combine, find_split_point, force_int_to_mode)
      	(simplify_shift_const_1, simplify_shift_const): Likewise.
      	(change_zero_ext): Likewise.  Use simplify_gen_binary.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255745
      Richard Sandiford committed
    • poly_int: MACRO_MODE · 05210ba6
      This patch uses a MACRO_MODE wrapper for the target macro invocations
      in targhooks.c and address.h, so that macros for non-AArch64 targets
      can continue to treat modes as fixed-size.
      
      It didn't seem worth converting the address macros to hooks since
      (a) they're heavily used, (b) they should be probably be replaced
      with a different interface rather than converted to hooks as-is,
      and most importantly (c) addresses.h already localises the problem.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* machmode.h (MACRO_MODE): New macro.
      	* addresses.h (base_reg_class, ok_for_base_p_1): Use it.
      	* targhooks.c (default_libcall_value, default_secondary_reload)
      	(default_memory_move_cost, default_register_move_cost)
      	(default_class_max_nregs): Likewise.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255744
      Richard Sandiford committed
    • poly_int: IN_TARGET_CODE · 8fcc61f8
      This patch makes each target-specifc TU define an IN_TARGET_CODE macro,
      which is used to decide whether poly_int<1, C> should convert to C.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/sourcebuild.texi: Document IN_TARGET_CODE.
      	* genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
      	target C file.
      	* genautomata.c (main): Likewise.
      	* genconditions.c (write_header): Likewise.
      	* genemit.c (main): Likewise.
      	* genextract.c (print_header): Likewise.
      	* genopinit.c (main): Likewise.
      	* genoutput.c (output_prologue): Likewise.
      	* genpeep.c (main): Likewise.
      	* genpreds.c (write_insn_preds_c): Likewise.
      	* genrecog.c (writer_header): Likewise.
      	* config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
      	* config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
      	* config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
      	* config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
      	* config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
      	* config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
      	* config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
      	* config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
      	* config/arc/arc.c (IN_TARGET_CODE): Likewise.
      	* config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
      	* config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
      	* config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
      	* config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
      	* config/arm/arm.c (IN_TARGET_CODE): Likewise.
      	* config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr.c (IN_TARGET_CODE): Likewise.
      	* config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
      	* config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
      	* config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
      	* config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
      	* config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
      	* config/cris/cris.c (IN_TARGET_CODE): Likewise.
      	* config/darwin.c (IN_TARGET_CODE): Likewise.
      	* config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
      	* config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
      	* config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
      	* config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
      	* config/frv/frv.c (IN_TARGET_CODE): Likewise.
      	* config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
      	* config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
      	* config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
      	* config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
      	* config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
      	* config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
      	* config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
      	* config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
      	* config/i386/i386.c (IN_TARGET_CODE): Likewise.
      	* config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
      	* config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
      	* config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
      	* config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
      	* config/i386/winnt.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
      	* config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
      	* config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
      	* config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
      	* config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
      	* config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
      	* config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
      	* config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
      	* config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
      	* config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
      	* config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
      	* config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
      	* config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
      	* config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
      	* config/mips/mips.c (IN_TARGET_CODE): Likewise.
      	* config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
      	* config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
      	* config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
      	* config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
      	* config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
      	* config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
      	* config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
      	* config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
      	* config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
      	* config/pa/pa.c (IN_TARGET_CODE): Likewise.
      	* config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
      	* config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
      	* config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
      	* config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
      	* config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
      	* config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
      	* config/rx/rx.c (IN_TARGET_CODE): Likewise.
      	* config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
      	* config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
      	* config/s390/s390.c (IN_TARGET_CODE): Likewise.
      	* config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
      	* config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
      	* config/sh/sh.c (IN_TARGET_CODE): Likewise.
      	* config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
      	* config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
      	* config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
      	* config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
      	* config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
      	* config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
      	* config/spu/spu.c (IN_TARGET_CODE): Likewise.
      	* config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
      	* config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
      	* config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
      	* config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
      	* config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
      	* config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
      	* config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
      	* config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
      	* config/v850/v850.c (IN_TARGET_CODE): Likewise.
      	* config/vax/vax.c (IN_TARGET_CODE): Likewise.
      	* config/visium/visium.c (IN_TARGET_CODE): Likewise.
      	* config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
      	* config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
      	* config/vms/vms.c (IN_TARGET_CODE): Likewise.
      	* config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255743
      Richard Sandiford committed
    • Minor vn_reference_lookup_3 tweak · 7a667e64
      The repeated checks for MEM_REF made this code hard to convert to
      poly_ints as-is.  Hopefully the new structure also makes it clearer
      at a glance what the two cases are.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid repeated
      	checks for MEM_REF.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255742
      Richard Sandiford committed
    • Add VEC_SERIES_EXPR and associated optab · 9adab579
      Similarly to the VEC_DUPLICATE_EXPR, this patch adds a tree code
      equivalent of the VEC_SERIES rtx code: VEC_SERIES_EXPR.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/generic.texi (VEC_SERIES_EXPR): Document.
      	* doc/md.texi (vec_series@var{m}): Document.
      	* tree.def (VEC_SERIES_EXPR): New tree code.
      	* tree.h (build_vec_series): Declare.
      	* tree.c (build_vec_series): New function.
      	* cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* gimple-pretty-print.c (dump_binary_rhs): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* expr.c (expand_expr_real_2): Likewise.
      	* optabs-tree.c (optab_for_tree_code): Likewise.
      	* tree-cfg.c (verify_gimple_assign_binary): Likewise.
      	* fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants.
      	* expmed.c (make_tree): Handle VEC_SERIES.
      	* optabs.def (vec_series_optab): New optab.
      	* optabs.h (expand_vec_series_expr): Declare.
      	* optabs.c (expand_vec_series_expr): New function.
      	* tree-vect-generic.c (expand_vector_operations_1): Check that
      	the operands also have vector type.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255741
      Richard Sandiford committed
    • Add VEC_DUPLICATE_EXPR and associated optab · be4c1d4a
      SVE needs a way of broadcasting a scalar to a variable-length vector.
      This patch adds VEC_DUPLICATE_EXPR for when CONSTRUCTOR would be used
      for fixed-length vectors; this is the tree equivalent of the existing
      rtl code VEC_DUPLICATE.
      
      The patch also adds a vec_duplicate_optab to go with VEC_DUPLICATE_EXPR.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hawyard@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/generic.texi (VEC_DUPLICATE_EXPR): Document.
      	(VEC_COND_EXPR): Add missing @tindex.
      	* doc/md.texi (vec_duplicate@var{m}): Document.
      	* tree.def (VEC_DUPLICATE_EXPR): New tree codes.
      	* tree.c (build_vector_from_val): Add stubbed-out handling of
      	variable-length vectors, using VEC_DUPLICATE_EXPR.
      	(uniform_vector_p): Handle VEC_DUPLICATE_EXPR.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* tree-vect-generic.c (ssa_uniform_vector_p): Likewise.
      	* fold-const.c (const_unop): Fold VEC_DUPLICATE_EXPRs of a constant.
      	(test_vec_duplicate_folding): New function.
      	(fold_const_c_tests): Call it.
      	* optabs.def (vec_duplicate_optab): New optab.
      	* optabs-tree.c (optab_for_tree_code): Handle VEC_DUPLICATE_EXPR.
      	* optabs.h (expand_vector_broadcast): Declare.
      	* optabs.c (expand_vector_broadcast): Make non-static.  Try using
      	vec_duplicate_optab.
      	* expr.c (store_constructor): Try using vec_duplicate_optab for
      	uniform vectors.
      	(expand_expr_real_2): Handle VEC_DUPLICATE_EXPR.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255740
      Richard Sandiford committed
    • re PR target/83358 (division not converted with Intel tuning since r253934) · 02308bd3
      2017-12-15  Markus Trippelsdorf  <markus@trippelsdorf.de>
      
      	PR target/83358
      	* config/i386/x86-tune-costs.h (skylake_cost, core_cost): Increase
      	div/mod latencies a bit.
      
              PR target/83358
      	* gcc.target/i386/pr83358-1.c: New test.
      	* gcc.target/i386/pr83358-2.c: New test.
      
      From-SVN: r255739
      Markus Trippelsdorf committed
    • os: pass -s to hostname on AIX · be528ae9
          
          Reviewed-on: https://go-review.googlesource.com/79375
      
      From-SVN: r255738
      Ian Lance Taylor committed
    • syscall: emulate Flock on AIX · fe6272cc
          
          Reviewed-on: https://go-review.googlesource.com/79095
      
      From-SVN: r255737
      Ian Lance Taylor committed
    • Daily bump. · dead5b99
      From-SVN: r255734
      GCC Administrator committed
  4. 15 Dec, 2017 4 commits
    • re PR middle-end/36550 (Wrong "may be used uninitialized" warning (conditional PHIs)) · b021b385
      	PR tree-optimization/36550
      	* tree-ssa-threadupdate.c (count_stmts_and_phis_in_block): New.
      	(mark_threaded_blocks): Rewrite code to avoid block copying when
      	optimizing for size.  Don't pessimize blocks which will be
      	copied, but all the statements will be dead.
      
      	PR tree-optimization/36550
      	* gcc.dg/tree-ssa/pr36550.c: New test.
      
      From-SVN: r255731
      Jeff Law committed
    • re PR tree-optimization/81165 (Regression in GCC-8.0.0's optimizer) · 5806e062
      	PR tree-optimization/81165
      	* tree-ssa-threadupdate.c (uses_in_bb): New.
      	(estimate_threading_killed_stmts): New.
      	* tree-ssa-threadupdate.h (estimate_threading_killed_stmts): Prototype.
      	* tree-ssa-threadedge.c
      	(record_temporary_equivalences_from_stmts_at_dest): Expand limit
      	when its hit.
      
      	PR tree-optimization/81165
      	* gcc.dg/pr81165.c: New.
      
      From-SVN: r255724
      Jeff Law committed
    • re PR c++/83205 (ICE on structured binding with ill-formed negative std::tuple_size<T>::value) · 38f4bea8
      	PR c++/83205
      	* decl.c (cp_finish_decomp): Handle the case when tsize is not
      	error_mark_node, but doesn't fit into uhwi.  Split up count != eltscnt
      	and !tree_fits_uhwi_p (tsize) error_at calls into error_n and inform_n
      	to handle plural forms properly.
      
      	* g++.dg/cpp1z/decomp3.C: Adjust for structured binding count
      	mismatch diagnostics split into error and warning with plural
      	forms.
      	* g++.dg/cpp1z/decomp10.C: Likewise.
      	* g++.dg/cpp1z/decomp32.C: New test.
      
      From-SVN: r255706
      Jakub Jelinek committed
    • re PR c++/81197 (ICE with structured binding and lifetime-extended temporaries) · 70356f77
      	PR c++/81197
      	* cp-tree.h (cp_maybe_mangle_decomp): Declare.
      	* decl.c (cp_maybe_mangle_decomp): New function.
      	(cp_finish_decomp): Don't SET_DECL_ASSEMBLER_NAME here.
      	* parser.c (cp_convert_range_for,
      	cp_parser_decomposition_declaration): Call cp_maybe_mangle_decomp.
      	* pt.c (tsubst_expr): Likewise.
      	* mangle.c (find_decomp_unqualified_name): New function.
      	(write_unqualified_name): Handle DECL_DECOMPOSITION_P
      	where DECL_ASSEMBLER_NAME is already set.
      
      	* g++.dg/cpp1z/decomp34.C: New test.
      
      From-SVN: r255705
      Jakub Jelinek committed