1. 22 Nov, 2017 38 commits
    • jit: update test suite for change to -Warray-bounds · d5438715
      jit.dg/test-error-array-bounds.c is a test of how libgccjit
      handles errors coming from the middle-end, using -Warray-bounds as
      an example.
      
      It started failing as of r254830 (aka 987b3316c4e7c908e3c7d2151c20971f9707ad66),
      due to that commit changing the wording of the message.
      
      This commit fixes the jit testcase by updating it to use the new
      wording.
      
      gcc/testsuite/ChangeLog:
      	PR tree-optimization/82588
      	PR tree-optimization/82583
      	* jit.dg/test-error-array-bounds.c (verify_code): Update expected
      	error message from -Warray-bounds.
      
      From-SVN: r255082
      David Malcolm committed
    • * g++.dg/graphite/pr41562.C: Add -Wno-return-type. · 1324d3f3
      From-SVN: r255081
      Jakub Jelinek committed
    • re PR libgomp/83106 (libgomp/target.c:2671:2: error: ‘strncat’ specified bound 5… · b13547d8
      re PR libgomp/83106 (libgomp/target.c:2671:2: error: ‘strncat’ specified bound 5 equals source length [-Werror=stringop-overflow=])
      
      	PR libgomp/83106
      	* target.c (gomp_target_init): Compute lengths just once and
      	use them in both malloc size and subsequent copying.
      
      From-SVN: r255080
      Jakub Jelinek committed
    • simplify-rtx.c (simplify_binary_operation_1): Handle the case where both… · 217e4393
      simplify-rtx.c (simplify_binary_operation_1): Handle the case where both arguments are using gen_const_vec_series.
      
      	* simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
      	Handle the case where both arguments are using gen_const_vec_series.
      
      From-SVN: r255079
      Jakub Jelinek committed
    • Make shift argument to eoshift0 and eoshift2 be of type index_type · a97ae559
      Test case that requires 4 GB RAM that exercises eoshift0:
      
      program main
        implicit none
        integer(1) :: line(2_8**31+10)
        line = 42
        line = eoshift(line, 2_8**31+7)
        print *, line(1:4)
        print *, line((ubound(line, 1, kind=8)-4):ubound(line, 1, kind=8))
      end program main
      
      Before patch:
      ❯ ./a.out
          0    0    0    0
          42   42   42   42   42
      
      With patch:
      ❯ ./a.out
         42   42   42    0
         0    0    0    0    0
      
      Regtested on x86_64-pc-linux-gnu.
      
      libgfortran/ChangeLog:
      
      2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>
      
              * intrinsics/eoshift0.c (eoshift0): Make shift an index_type.
              * intrinsics/eoshift2.c (eoshift2): Make shift an index_type.
      
      From-SVN: r255077
      Janne Blomqvist committed
    • C/C++: fix quoting of "aka" typedef information (PR 62170) · ce95abc4
      PR 62170 describes a problem with how the quoting in pp_format
      interacts with the "aka" information for typedefs in %qT for
      the C family of frontends, and also now for %qH and %qI in the
      C++ frontend: we print:
      
        'Py_ssize_t* {aka int*}'
         ^^^^^^^^^^^^^^^^^^^^^^ colorized as "quote"
      
      i.e.
        '[START_COLOR]Py_ssize_t* {aka int*}[END_COLOR]'
      
      when we should print:
      
        'Py_ssize_t*' {aka 'int*'}
         ^^^^^^^^^^^        ^^^^ colorized as "quote"
      
      i.e.
        '[START_COLOR]Py_ssize_t*[END_COLOR]' {aka '[START_COLOR]int*[END_COLOR]'}
      
      where the opening and closing quote characters and colorization are
      added by the 'q' handling within pp_format.
      
      This patch fixes the quoting by updating the %T handling in C and C++
      and the %H/%I handling in C++ to insert the quoting appropriately.
      It converts the "quote" param of the pp_format_decoder callback from
      bool to bool *, allowing for the %T and %H/%I handlers to write
      false back to it, to avoid printing the closing quote for the cases
      like the above where the trailing closing quote isn't needed.
      
      It introduces pp_begin_quote/pp_end_quote to simplify this.  These
      take a "bool show_color", rather than using "pp_show_color (pp)"
      since cxx_pp's pp_show_color isn't currently initialized (since
      cxx_initialize_diagnostics happens before diagnostic_color_init).
      
      gcc/c/ChangeLog:
      	PR c++/62170
      	* c-objc-common.c (c_tree_printer): Convert penultimate param from
      	bool to bool *.  Within '%T' handling, if showing an "aka", use
      	"quoted" param to add appropriate quoting.
      
      gcc/cp/ChangeLog:
      	PR c++/62170
      	* error.c (type_to_string): Add leading comment.  Add params
      	"postprocessed", "quote", and "show_color", using them to fix
      	quoting of the "aka" for types involving typedefs.
      	(arg_to_string): Update for new params to type_to_string.
      	(cxx_format_postprocessor::handle): Likewise.
      	(cp_printer): Convert penultimate param from bool to bool *.
      	Update call to type_to_string and calls to
      	defer_phase_2_of_type_diff.
      
      gcc/fortran/ChangeLog:
      	PR c++/62170
      	* error.c (gfc_notify_std): Convert "quoted" param from bool to
      	bool *.
      
      gcc/ChangeLog:
      	PR c++/62170
      	* pretty-print.c (pp_format): Move quoting implementation to
      	pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
      	to pass address of "quote" local.
      	(pp_begin_quote): New function.
      	(pp_end_quote): New function.
      	* pretty-print.h (printer_fn): Convert penultimate param from bool
      	to bool *.
      	(pp_begin_quote): New decl.
      	(pp_end_quote): New decl.
      	* tree-diagnostic.c (default_tree_printer): Convert penultimate
      	param from bool to bool *.
      	* tree-diagnostic.h (default_tree_printer): Likewise.
      
      gcc/testsuite/ChangeLog:
      	PR c++/62170
      	* g++.dg/diagnostic/aka1.C: Update expected error messages to
      	reflect fixes to quoting.
      	* g++.dg/diagnostic/aka2.C: New test case.
      	* g++.dg/parse/error55.C: Update expected error messages to
      	reflect fixes to quoting.
      	* gcc.dg/diag-aka-1.c: Likewise.
      	* gcc.dg/diag-aka-2.c: New test case.
      	* gcc.dg/pr13804-1.c: Update expected error messages to reflect
      	fixes to quoting.
      	* gcc.dg/pr56980.c: Likewise.
      	* gcc.dg/pr65050.c: Likewise.
      	* gcc.dg/redecl-14.c: Likewise.
      	* gcc.dg/utf16-4.c Likewise.
      	* gcc.target/i386/sse-vect-types.c (__m128d): Likewise.
      	* obj-c++.dg/invalid-type-1.mm: Likewise.
      	* objc.dg/proto-lossage-4.m: Likewise.
      
      From-SVN: r255076
      David Malcolm committed
    • target-supports.exp (check_effective_target_bswap16): Remove · d8d9aa38
      	* lib/target-supports.exp (check_effective_target_bswap16): Remove
      	(check_effective_target_bswap32): Ditto.
      	(check_effective_target_bswap64): Ditto.
      	* gcc.dg/optimize-bswaphi-1.c: Use bswap effective
      	target instead of bswap16.
      	* gcc.dg/optimize-bswapsi-1.c: Use bswap effective
      	target instead of bswap32.
      	* gcc.dg/optimize-bswapsi-2.c: Ditto.
      	* gcc.dg/optimize-bswapsi-3.c: Ditto.
      	* gcc.dg/optimize-bswapsi-4.c: Ditto.
      	* gcc.dg/optimize-bswapsi-5.c: Ditto.
      	* gcc.dg/pr77673.c: Ditto.
      	* gcc.dg/optimize-bswapdi-1.c: Use bswap effective
      	target instead of bswap64.
      	* gcc.dg/optimize-bswapdi-2.c: Ditto.
      	* gcc.dg/optimize-bswapdi-3.c: Ditto.
      
      From-SVN: r255075
      Uros Bizjak committed
    • * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer) · a5de02e9
      	Initialize vr_values.
      	(evrp_range_analyzer::try_find_new_range): Call methods attached to
      	vr_values via vr_values class instance rather than delegators.
      	(evrp_range_analyzer::record_ranges_from_phis): Likewise.
      	(evrp_range_analyzer::record_ranges_from_stmt): Likewise.
      	(evrp_range_analyzer::push_value_range): Likewise.
      	(evrp_range_analyzer::pop_value_range): Likewise.
      	* gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
      	most delegators.  Those remaining are exposed as public interfaces.
      	Make vr_values a pointer and private.
      	(evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
      	vr_values.
      	(evrp_range_analyzer::get_vr_value): New method.
      	* gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
      	(evrp_folder::evrp_folder): New ctor to initialize vr_values.
      	(class evrp_dom_walker): Attach evrp_folder class, initialize
      	it in the ctor.  Remove temporary delegators.
      	(evrp_dom_walker::before_dom_children): Call methods in attached
      	evrp_range_analyzer class via class instance pointer.  Use
      	free value_range_constant_singleton to remove need for
      	op_with_constant_singleton_value delegator method.  Do not
      	create a vrp_prop class instance for every call!  Narrow
      	scope of a couple variables.
      	(evrp_dom_walker::cleanup): Call methods in attached
      	evrp_range_analyzer class via class instance pointer.
      	* vr-values.h (class vr_values): Privatize many methods and
      	data members.
      
      From-SVN: r255074
      Jeff Law committed
    • Replace REDUC_*_EXPRs with internal functions. · 16d24520
      This patch replaces the REDUC_*_EXPR tree codes with internal functions.
      This is needed so that the upcoming in-order reductions can also use
      internal functions without too much complication.
      
      2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
      	* cfgexpand.c (expand_debug_expr): Remove handling for them.
      	* expr.c (expand_expr_real_2): Likewise.
      	* fold-const.c (const_unop): Likewise.
      	* optabs-tree.c (optab_for_tree_code): Likewise.
      	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	(op_code_prio): Likewise.
      	(op_symbol_code): Likewise.
      	* internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
      	(IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
      	* internal-fn.c (direct_internal_fn_optab): New function.
      	(direct_internal_fn_array, direct_internal_fn_supported_p
      	(internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
      	* fold-const-call.c (fold_const_reduction): New function.
      	(fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
      	CFN_REDUC_MIN.
      	* tree-vect-loop.c: Include internal-fn.h.
      	(reduction_code_for_scalar_code): Rename to...
      	(reduction_fn_for_scalar_code): ...this and return an internal
      	function.
      	(vect_model_reduction_cost): Take an internal_fn rather than
      	a tree_code.
      	(vect_create_epilog_for_reduction): Likewise.  Build calls rather
      	than assignments.
      	(vectorizable_reduction): Use internal functions rather than tree
      	codes for the reduction operation.  Update calls to the functions
      	above.
      	* config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
      	Use calls to internal functions rather than REDUC tree codes.
      	* config/aarch64/aarch64-simd.md: Update comment accordingly.
      
      From-SVN: r255073
      Richard Sandiford committed
    • PR 83097 Use __BYTE_ORDER__ predefined macro instead of runtime check · 5675291d
      By using the __BYTE_ORDER__ predefined macro we don't need the
      determine_endianness function anymore.
      
      Regtested on x86_64-pc-linux-gnu.
      
      libgfortran/ChangeLog:
      
      2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>
      
              PR libfortran/83097
      	* io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined
      	macro.
      	* io/open.c (st_open): Likewise.
      	* io/transfer.c (data_transfer_init): Likewise.
      	* io/write.c (btoa_big): Likewise.
      	(otoa_big): Likewise.
      	(ztoa_big): Likewise.
      	* libgfortran.h (big_endian): Remove variable.
      	(GFOR_POINTER_TO_L1): Use __BYTE_ORDER__ macro.
      	* runtime/main.c (determine_endianness): Remove function.
      	(init): Remove call to determine_endianness.
      	* runtime/minimal.c: Remove setting big_endian variable.
      
      From-SVN: r255072
      Janne Blomqvist committed
    • [PATCH] Add myself as GCC maintainer · 90b415f6
      *** ChangeLog ***
      
      2017-11-22  Sudakshina Das  <sudi.das@arm.com>
      
      	* MAINTAINERS (Write After Approval): Add myself.
      
      From-SVN: r255071
      Sudakshina Das committed
    • re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments) · ddc9995b
      2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/36313
      	* Makefile.am: Add i_maxloc0s_c, i_maxloc1s_c, i_maxloc2s_c,
      	i_minloc0s_c, i_minloc1s_c and i_minloc2s_c.
      	* Makefile.in: Regenerated.
              * generated/maxloc0_16_s1.c: New file.
              * generated/maxloc0_16_s4.c: New file.
              * generated/maxloc0_4_s1.c: New file.
              * generated/maxloc0_4_s4.c: New file.
              * generated/maxloc0_8_s1.c: New file.
              * generated/maxloc0_8_s4.c: New file.
              * generated/maxloc1_16_s1.c: New file.
              * generated/maxloc1_16_s4.c: New file.
              * generated/maxloc1_4_s1.c: New file.
              * generated/maxloc1_4_s4.c: New file.
              * generated/maxloc1_8_s1.c: New file.
              * generated/maxloc1_8_s4.c: New file.
              * generated/maxloc2_16_s1.c: New file.
              * generated/maxloc2_16_s4.c: New file.
              * generated/maxloc2_4_s1.c: New file.
              * generated/maxloc2_4_s4.c: New file.
              * generated/maxloc2_8_s1.c: New file.
              * generated/maxloc2_8_s4.c: New file.
              * generated/minloc0_16_s1.c: New file.
              * generated/minloc0_16_s4.c: New file.
              * generated/minloc0_4_s1.c: New file.
              * generated/minloc0_4_s4.c: New file.
              * generated/minloc0_8_s1.c: New file.
              * generated/minloc0_8_s4.c: New file.
              * generated/minloc1_16_s1.c: New file.
              * generated/minloc1_16_s4.c: New file.
              * generated/minloc1_4_s1.c: New file.
              * generated/minloc1_4_s4.c: New file.
              * generated/minloc1_8_s1.c: New file.
              * generated/minloc1_8_s4.c: New file.
              * generated/minloc2_16_s1.c: New file.
              * generated/minloc2_16_s4.c: New file.
              * generated/minloc2_4_s1.c: New file.
              * generated/minloc2_4_s4.c: New file.
              * generated/minloc2_8_s1.c: New file.
              * generated/minloc2_8_s4.c: New file.
              * m4/iforeach-s.m4: New file.
              * m4/ifunction-s.m4: New file.
              * m4/maxloc0s.m4: New file.
              * m4/maxloc1s.m4: New file.
              * m4/maxloc2s.m4: New file.
              * m4/minloc0s.m4: New file.
              * m4/minloc1s.m4: New file.
              * m4/minloc2s.m4: New file.
      	* gfortran.map: Add new functions.
      	* libgfortran.h: Add gfc_array_s1 and gfc_array_s4.
      
      2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/36313
      	* check.c (int_or_real_or_char_check_f2003): New function.
      	* iresolve.c (gfc_resolve_maxloc): Add number "2" for
      	character arguments and rank-zero return value.
      	(gfc_resolve_minloc): Likewise.
      	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
      	character arguments and rank-zero return value by removing
      	unneeded arguments and calling the library function.
      
      2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/36313
      	* gfortran.dg/maxloc_string_1.f90: New test.
      	* gfortran.dg/minloc_string_1.f90: New test.
      
      From-SVN: r255070
      Thomas Koenig committed
    • vxworks.c (vxworks_override_options): Pick default dwarf version from macro… · 824a2b3d
      vxworks.c (vxworks_override_options): Pick default dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
      
      2017-11-22  Olivier Hainque  <hainque@adacore.com>
      
             * config/vxworks.c (vxworks_override_options): Pick default
      	dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
             * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
             DWARF_GNAT_ENCODINGS_DEFAULT.
             * config/vxworksae.h: Likewise.
      
      From-SVN: r255069
      Olivier Hainque committed
    • Avoid two_valued_val_range_p for pointers. · e54675bb
      2017-11-22  Marc Glisse  <marc.glisse@inria.fr>
      
      	PR tree-optimization/83104
      gcc/
      	* vr-values.c (simplify_stmt_using_ranges): Check integral argument,
      	not result.
      
      gcc/testsuite/
      	* gcc.c-torture/compile/pr83104.c: New file.
      
      From-SVN: r255068
      Marc Glisse committed
    • [ARM] Fix more -Wreturn-type fallout (gcc.target/arm/pr56184.C). · 29a3136e
      2017-11-22  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	* gcc.target/arm/pr56184.C: Add -Wno-return-type to dg-options.
      
      From-SVN: r255067
      Christophe Lyon committed
    • re PR c++/60336 (empty struct value is passed differently in C and C++) · 974aedcc
      	PR c++/60336
      	PR middle-end/67239
      	PR target/68355
      	* c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
      
      	* class.c (layout_class_type): Set DECL_PADDING_P on padding.
      	* decl.c (cxx_init_decl_processing): Set TRANSLATION_UNIT_WARN_EMPTY_P.
      	(grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
      
      	* lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
      
      	* calls.c (initialize_argument_information): Call
      	warn_parameter_passing_abi target hook.
      	(store_one_arg): Use 0 for empty record size.  Don't push 0 size
      	argument onto stack.
      	(must_pass_in_stack_var_size_or_pad): Return false for empty types.
      	* common.opt: Update -fabi-version description.
      	* config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
      	(ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
      	int_size_in_bytes.
      	(ix86_is_empty_record): New function.
      	(ix86_warn_parameter_passing_abi): New function.
      	(TARGET_EMPTY_RECORD_P): Redefine.
      	(TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
      	* config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
      	* doc/tm.texi: Regenerated.
      	* doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
      	TARGET_WARN_PARAMETER_PASSING_ABI): Add.
      	* dwarf2out.c (get_ultimate_context): Move to tree.c.
      	* explow.c (hard_function_value): Call arg_int_size_in_bytes
      	instead of int_size_in_bytes.
      	* expr.c (copy_blkmode_to_reg): Likewise.
      	* function.c (aggregate_value_p): Return 0 for empty types.
      	(assign_parm_find_entry_rtl): Call warn_parameter_passing_abi target hook.
      	(locate_and_pad_parm): Call arg size_in_bytes instead
      	size_in_bytes.
      	* lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
      	* stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
      	* target.def (empty_record_p, warn_parameter_passing_abi): New target
      	hooks.
      	* targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
      	(std_gimplify_va_arg_expr): Skip empty records.  Call
      	arg_size_in_bytes instead size_in_bytes.
      	* targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
      	* tree-core.h (tree_type_common): Add empty_flag.
      	(tree_decl_common): Update comments.
      	* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
      	DECL_PADDING_P.
      	(unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
      	* tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
      	DECL_PADDING_P.
      	(pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
      	* tree.c (default_is_empty_type): New function.
      	(default_is_empty_record): New function.
      	(arg_int_size_in_bytes): New function.
      	(arg_size_in_bytes): New function.
      	(get_ultimate_context): New function.
      	* tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
      	TRANSLATION_UNIT_WARN_EMPTY_P.
      	(default_is_empty_record, arg_int_size_in_bytes,
      	arg_size_in_bytes, get_ultimate_context): Declare.
      
      	* g++.dg/abi/empty12.C: New test.
      	* g++.dg/abi/empty12.h: New test.
      	* g++.dg/abi/empty12a.c: New test.
      	* g++.dg/abi/empty13.C: New test.
      	* g++.dg/abi/empty13.h: New test.
      	* g++.dg/abi/empty13a.c: New test.
      	* g++.dg/abi/empty14.C: New test.
      	* g++.dg/abi/empty14.h: New test.
      	* g++.dg/abi/empty14a.c: New test.
      	* g++.dg/abi/empty15.C: New test.
      	* g++.dg/abi/empty15.h: New test.
      	* g++.dg/abi/empty15a.c: New test.
      	* g++.dg/abi/empty16.C: New test.
      	* g++.dg/abi/empty16.h: New test.
      	* g++.dg/abi/empty16a.c: New test.
      	* g++.dg/abi/empty17.C: New test.
      	* g++.dg/abi/empty17.h: New test.
      	* g++.dg/abi/empty17a.c: New test.
      	* g++.dg/abi/empty18.C: New test.
      	* g++.dg/abi/empty18.h: New test.
      	* g++.dg/abi/empty18a.c: New test.
      	* g++.dg/abi/empty19.C: New test.
      	* g++.dg/abi/empty19.h: New test.
      	* g++.dg/abi/empty19a.c: New test.
      	* g++.dg/abi/empty20.C: New test.
      	* g++.dg/abi/empty21.C: New test.
      	* g++.dg/abi/empty22.C: New test.
      	* g++.dg/abi/empty22.h: New test.
      	* g++.dg/abi/empty22a.c: New test.
      	* g++.dg/abi/empty23.C: New test.
      	* g++.dg/abi/empty24.C: New test.
      	* g++.dg/abi/empty25.C: New test.
      	* g++.dg/abi/empty25.h: New test.
      	* g++.dg/abi/empty25a.c: New test.
      	* g++.dg/abi/empty26.C: New test.
      	* g++.dg/abi/empty26.h: New test.
      	* g++.dg/abi/empty26a.c: New test.
      	* g++.dg/abi/empty27.C: New test.
      	* g++.dg/abi/empty28.C: New test.
      	* g++.dg/abi/pr60336-1.C: New test.
      	* g++.dg/abi/pr60336-10.C: New test.
      	* g++.dg/abi/pr60336-11.C: New test.
      	* g++.dg/abi/pr60336-12.C: New test.
      	* g++.dg/abi/pr60336-2.C: New test.
      	* g++.dg/abi/pr60336-3.C: New test.
      	* g++.dg/abi/pr60336-4.C: New test.
      	* g++.dg/abi/pr60336-5.C: New test.
      	* g++.dg/abi/pr60336-6.C: New test.
      	* g++.dg/abi/pr60336-7.C: New test.
      	* g++.dg/abi/pr60336-8.C: New test.
      	* g++.dg/abi/pr60336-9.C: New test.
      	* g++.dg/abi/pr68355.C: New test.
      	* g++.dg/lto/pr60336_0.C: New test.
      
      Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
      Co-Authored-By: Jason Merrill <jason@redhat.com>
      
      From-SVN: r255066
      Marek Polacek committed
    • [ARM] Factor out CMSE register clearing code · fc7160b2
      Functions cmse_nonsecure_call_clear_caller_saved and
      cmse_nonsecure_entry_clear_before_return both contain very similar code
      to clear registers. What's worse, they differ slightly at times so if a
      bug is found in one careful thoughts is needed to decide whether the
      other function needs fixing too.
      
      This commit addresses the situation by factoring the two pieces of code
      into a new function. In doing so the code generated to clear VFP
      registers in cmse_nonsecure_call now uses the same sequence as
      cmse_nonsecure_entry functions. Tests expectation are thus updated
      accordingly.
      
      2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/arm.c (cmse_clear_registers): New function.
          (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
          code by call to cmse_clear_registers.
          (cmse_nonsecure_entry_clear_before_return): Likewise.
      
          gcc/testsuite/
          * gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: Adapt expectations
          to vmov instructions now generated.
          * gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: Likewise.
          * gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: Likewise.
          * gcc.target/arm/cmse/mainline/hard/cmse-13.c: Likewise.
          * gcc.target/arm/cmse/mainline/hard/cmse-7.c: Likewise.
          * gcc.target/arm/cmse/mainline/hard/cmse-8.c: Likewise.
      
      From-SVN: r255065
      Thomas Preud'homme committed
    • 2017-11-22 Tamar Christina <tamar.christina@arm.com> · 9388732a
      	* config/arm/arm_neon.h (vdot_u32, vdotq_u32)
      	(vdot_s32, vdotq_s32): New.
      	(vdot_lane_u32, vdotq_lane_u32): New.
      	(vdot_lane_s32, vdotq_lane_s32): New.
      
      
      gcc/testsuite/
      2017-11-22  Tamar Christina  <tamar.christina@arm.com>
      
      	* gcc.target/arm/simd/vdot-compile.c: New.
      	* gcc.target/arm/simd/vect-dot-qi.h: New.
      	* gcc.target/arm/simd/vect-dot-s8.c: New.
      	* gcc.target/arm/simd/vect-dot-u8.c: New
      
      From-SVN: r255064
      Tamar Christina committed
    • target-supports.exp (check_effective_target_bswap16): Do not skip on alpha and x86 targets. · e88efb99
      	* lib/target-supports.exp (check_effective_target_bswap16):
      	Do not skip on alpha and x86 targets.
      
      From-SVN: r255063
      Uros Bizjak committed
    • compiler: make comparison operator() methods const · 9e951dd6
          
          This is required for new versions of libstdc++ in C++17 mode.
          
          Fixes GCC PR 83102.
          
          Reviewed-on: https://go-review.googlesource.com/79396
      
      From-SVN: r255062
      Ian Lance Taylor committed
    • [ARM] Fix test armv8_2-fp16-move-1.c · 543382b7
      2017-11-22  Sudakshina Das  <sudi.das@arm.com>
      
      	* gcc.target/arm/armv8_2-fp16-move-1.c: Add -mfloat-abi=hard option.
      
      From-SVN: r255061
      Sudakshina Das committed
    • PR82547: Undetected overflow for UNSIGNED wide_ints · 2131f7f5
      wi::add_large and wi::sub_large weren't setting the overflow bit
      correctly for unsigned operations if the result needed fewer HWIs
      than the precision.
      
      2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	PR middle-end/82547
      	* wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
      	for unsigned values with fewer HWIs than the precision.
      	(test_overflow): New function.
      	(wide_int_cc_tests): Call it.
      
      From-SVN: r255059
      Richard Sandiford committed
    • PR83004: Accidental change to pr81136.c for VECTOR_BITS==128 · a76ef9c5
      r254589 was supposed to leave tests unchanged for the default
      VECTOR_BITS==128, but I must have got my sums wrong on pr81136.c.
      
      2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/testsuite/
      	PR testsuite/83004
      	* gcc.dg/vect/pr81136.c: Restore previous alignment of 32
      	in the default case.
      
      From-SVN: r255058
      Richard Sandiford committed
    • Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode · f95c5b8e
      This patch fixes a regression caused by r251469, where I'd incorrectly
      converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs.
      
      2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
      	has the same mode class as Pmode.
      
      From-SVN: r255057
      Richard Sandiford committed
    • arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of padding_bits_to_clear_ptr. · 902c4e8f
      2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
          padding_bits_to_clear_ptr.
          (cmse_nonsecure_entry_clear_before_return): Likewise.
      
      From-SVN: r255056
      Thomas Preud'homme committed
    • [ARM] Use bitmap to control cmse_nonsecure_call register clearing · b24de9a6
      As part of r253256, cmse_nonsecure_entry_clear_before_return has been
      rewritten to use auto_sbitmap instead of an integer bitfield to control
      which register needs to be cleared. This commit continues this work in
      cmse_nonsecure_call_clear_caller_saved.
      
      2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
          auto_sbitap instead of integer bitfield to control register needing
          clearing.
      
      From-SVN: r255055
      Thomas Preud'homme committed
    • re PR tree-optimization/83044 (ice in contains_struct_check) · ff479068
      	PR tree-optimization/83044
      	* tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
      	INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
      	that need the upper bound.  Subtract offset from
      	get_addr_base_and_unit_offset only if positive and subtract it
      	before division by eltsize rather than after it.
      
      	* gcc.dg/pr83044.c: New test.
      	* c-c++-common/Warray-bounds.c (fb): Fix up MAX value.
      
      From-SVN: r255054
      Jakub Jelinek committed
    • re PR fortran/79072 (ICE with class(*) pointer function result and character value) · a7d3cd40
      2017-11-22  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/79072
      	* trans-stmt.c (trans_associate_var): Weaken the over strong
      	condition for using the fake result decl.
      
      2017-11-22  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/79072
      	* gfortran.dg/class_result_6.f90: New test for comment 10 of
      	the PR.
      
      From-SVN: r255053
      Paul Thomas committed
    • PR go/83102 relax std::set checks for invocable comparison object · e350134d
      	PR go/83102
      	* include/bits/stl_tree.h (_Rb_tree): Relax invocable checks for
      	comparison object pre-C++17.
      
      From-SVN: r255052
      Jonathan Wakely committed
    • re PR debug/83084 (-fcompare-debug failure on ppc64le) · aaa49b45
      	PR debug/83084
      	* valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
      	debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
      	(dead_debug_insert_temp): Likewise, but also ignore even non-volatile
      	asm.
      
      	* g++.dg/opt/pr83084.C: New test.
      
      From-SVN: r255051
      Jakub Jelinek committed
    • re PR middle-end/82875 (ICE at -Os on valid code on x86_64-linux-gnu: in… · a2998ed1
      re PR middle-end/82875 (ICE at -Os on valid code on x86_64-linux-gnu: in find_widening_optab_handler_and_mode, at optabs-query.c:414)
      
      	PR middle-end/82875
      	* optabs.c (expand_doubleword_mult, expand_binop): Before calling
      	expand_binop with *mul_widen_optab, make sure at least one of the
      	operands doesn't have VOIDmode.
      
      	* gcc.dg/pr82875.c: New test.
      	* gcc.c-torture/compile/pr82875.c: New test.
      
      From-SVN: r255050
      Jakub Jelinek committed
    • re PR debug/83034 (ice in mem_loc_descriptor, at dwarf2out.c :15669) · 0a770b59
      	PR debug/83034
      	* dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
      
      	* gcc.dg/pr83034.c: New test.
      
      From-SVN: r255049
      Jakub Jelinek committed
    • re PR rtl-optimization/82044 (runtime signed integer overflow in… · 213ffde2
      re PR rtl-optimization/82044 (runtime signed integer overflow in check_mem_read_rtx() and all_positions_needed_p() in dse.c)
      
      	PR rtl-optimization/82044
      	PR tree-optimization/82042
      	* dse.c (record_store): Check for overflow.
      	(check_mem_read_rtx): Properly check for overflow if width == -1, call
      	add_wild_read instead of clear_rhs_from_active_local_stores on
      	overflow and log it into dump_file.
      
      From-SVN: r255048
      Jakub Jelinek committed
    • gimple-iterator.c (gimple_find_edge_insert_loc): Ignore fake edges to exit when… · 608c0f63
      gimple-iterator.c (gimple_find_edge_insert_loc): Ignore fake edges to exit when looking for a place to insert.
      
      2017-11-22  Richard Biener  <rguenther@suse.de>
      
      	* gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
      	fake edges to exit when looking for a place to insert.
      	* tree-ssa-pre.c (clear_expression_ids): Inline into callers
      	and remove.
      	(insert_into_preds_of_block): Commit edge insertion immediately,
      	assert that doesn't require new BBs.
      	(fini_pre): Release expressions.
      	(pass_pre::execute): Shuffle things around a bit, if the fn
      	is too large do not compute AVAIL either as this is really the
      	quadratic bit.
      
      From-SVN: r255047
      Richard Biener committed
    • PR 83070 Fix -Wsign-compare warning · 9cf7bfd9
      2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>
      
              PR libfortran/83070
              * intrinsics/eoshift0.c (eoshift0): Fix -Wsign-compare warning by
              making a_ex and r_ex index_type instead of size_t.
      
      From-SVN: r255045
      Janne Blomqvist committed
    • re PR tree-optimization/83089 (ICE: Segmentation fault (in instantiate_scev_name)) · 8f8e5326
      2017-11-22  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/83089
      	* tree-if-conv.c (pass_if_conversion::execute): If anything
      	changed reset SCEV and free the number of iteration estimates.
      
      	* gcc.dg/pr83089.c: New testcase.
      
      From-SVN: r255044
      Richard Biener committed
    • libgo: don't use grep -q in mksigtab.sh · ce143aa6
          
          Solaris grep does not support the -q option.
          
          Reviewed-on: https://go-review.googlesource.com/79239
      
      From-SVN: r255042
      Ian Lance Taylor committed
    • Daily bump. · 2ee325a5
      From-SVN: r255041
      GCC Administrator committed
  2. 21 Nov, 2017 2 commits
    • C: don't suggest names that came from earlier failures (PR c/83056) · d4300cc6
      PR c/83056 reports an issue affecting trunk and gcc-7 in which
      the C frontend's implementation of lookup_name_fuzzy uses undeclared
      identifiers as suggestions when encountering subsequent undeclared
      identifiers.
      
      The fix is to filter out the names bound to error_mark_node
      in lookup_name_fuzzy.
      
      The C++ frontend is unaffected, as it already does this.
      
      gcc/c/ChangeLog:
      	PR c/83056
      	* c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
      	earlier failed lookups.
      
      gcc/testsuite/ChangeLog:
      	PR c/83056
      	* gcc.dg/spellcheck-pr83056.c: New test case.
      
      From-SVN: r255038
      David Malcolm committed
    • re PR tree-optimization/82945 (add warning for passing non-strings to functions… · 6f9b7472
      re PR tree-optimization/82945 (add warning for passing non-strings to functions that expect string arguments)
      
      gcc/ChangeLog:
      
      	PR tree-optimization/82945
      	* calls.h (warn_nonstring_bound): Remove unused function.
      
      From-SVN: r255036
      Martin Sebor committed