1. 18 Dec, 2017 16 commits
    • testsuite: add coverage for diagnostics relating to inlining (PR tree-optimization/83336) · ab6e54a6
      In theory, the diagnostics subsystem can print context information on
      code inlining when diagnostics are emitted by the middle-end, describing
      the chain of inlined callsites that led to a particular warning,
      but PR tree-optimization/83336 describes various issues with this.
      
      An underlying issue is that we have very little automated testing for
      this code: gcc.dg/tm/pr52141.c has a test, but in general, prune.exp
      filters out the various "inlined from" lines.
      
      The following patch adds test coverage for it for C and C++ via a new
      testsuite plugin, which emits a warning from the middle-end; the test
      cases use dg-regexp to verify that the "inlined from" lines are
      emitted correctly, with the correct function names and source locations.
      
      Doing so requires a change to prune.exp: the dg-regexp lines have to
      be handled *before* the "inlined from" lines are stripped.
      
      gcc/testsuite/ChangeLog:
      	PR tree-optimization/83336
      	* g++.dg/cpp0x/missing-initializer_list-include.C: Update for
      	changes to prune.exp's handling of dg-regexp.
      	* g++.dg/plugin/diagnostic-test-inlining-1.C: New test case.
      	* g++.dg/plugin/plugin.exp (plugin_test_list): Add it, via
      	gcc.dg's plugin/diagnostic_plugin_test_inlining.c.
      	* gcc.dg/plugin/diagnostic-test-inlining-1.c: New test case.
      	* gcc.dg/plugin/diagnostic-test-inlining-2.c: Likewise.
      	* gcc.dg/plugin/diagnostic-test-inlining-3.c: Likewise.
      	* gcc.dg/plugin/diagnostic-test-inlining-4.c: Likewise.
      	* gcc.dg/plugin/diagnostic_plugin_test_inlining.c: New test
      	plugin.
      	* gcc.dg/plugin/plugin.exp (plugin_test_list): Add them.
      	* lib/prune.exp (prune_gcc_output): Move call to handle-dg-regexps
      	to before the various text stripping regsup invocations,
      	in particular, to before the stripping of "inlined from".
      
      From-SVN: r255786
      David Malcolm committed
    • re PR libstdc++/68430 (std::is_constructible<T>::value == true for unconstructible type T) · 5dd44f4e
      PR libstdc++/68430
      
      * testsuite/20_util/is_constructible/68430.cc: New.
      
      From-SVN: r255785
      Ville Voutilainen committed
    • re PR middle-end/83460 (FAIL: g++.dg/pr79095-4.C) · 59024129
      	PR middle-end/83460
      	* g++.dg/pr79095-4.C: Remove compromised test.
      
      From-SVN: r255784
      Jeff Law committed
    • re PR c++/83300 (Segmentation fault with template and __attribute__((vector_size… · 58cc7d79
      re PR c++/83300 (Segmentation fault with template and __attribute__((vector_size (sizeof(int) * N)));)
      
      	PR c++/83300
      	* decl2.c (save_template_attributes): Add flags argument, if
      	not ATTR_FLAG_TYPE_IN_PLACE, *decl_p is a type and we want to
      	modify TYPE_ATTRIBUTES, add them on type attribute variant.
      
      	* g++.dg/ext/vector33.C: New test.
      
      From-SVN: r255783
      Jakub Jelinek committed
    • c-warn.c (warn_logical_operator): Return early if -Wlogical-op is not in effect. · 82cfbd01
      	* c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
      	not in effect.
      
      From-SVN: r255782
      Marek Polacek committed
    • re PR middle-end/83463 (ICE: tree check: expected integer_type or enumeral_type… · 066fc751
      re PR middle-end/83463 (ICE: tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have pointer_type in builtin_memr ef, at gimple-ssa-warn-restrict.c:297)
      
      	PR middle-end/83463
      	* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
      	Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
      	values.
      
      	* gcc.dg/pr83463.c: New test.
      
      From-SVN: r255781
      Marek Polacek committed
    • [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 15 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