1. 09 May, 2017 16 commits
    • [ARC]Fast interrupts support. · c7314bc1
      When a processor enters a fast interrupts handler, and duplicate
      register banks are configured, the processor saves the user context by
      saving the registers in the main register bank to these additional
      registers in the duplicate register bank.  In this fast interrupt
      context, when you specify the rgf_banked_regs option,the compiler does
      not save the registers duplicated in the additional register bank are
      not saved.
      
      gcc/
      2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>
      	    Andrew Burgess  <andrew.burgess@embecosm.com>
      
      	* config/arc/arc.c (ARC_AUTOBLINK_IRQ_P): Consider fast interrupts
      	case also.
      	(ARC_AUTOFP_IRQ_P): Likewise.
      	(ARC_AUTO_IRQ_P): Likewise.
      	(rgf_banked_register_count): New variable.
      	(parse_mrgf_banked_regs_option): New function.
      	(arc_override_options): Handle rgf_banked_regs option.
      	(arc_handle_interrupt_attribute): Add firq option.
      	(arc_compute_function_type): Return fast irq type when required.
      	(arc_must_save_register): Handle fast interrupts.
      	(arc_expand_prologue): Do not emit dwarf info for fast interrupts.
      	(arc_return_address_regs): Update.
      	* config/arc/arc.h (arc_return_address_regs): Update.
      	(arc_function_type): Add fast interrupt type.
      	(ARC_INTERRUPT_P): Update.
      	(RC_FAST_INTERRUPT_P): Define.
      	* config/arc/arc.md (simple_return): Update for fast interrupts.
      	(p_return_i): Likewise.
      	* config/arc/arc.opt (mrgf-banked-regs): New option.
      	* doc/invoke.texi (mrgf-banked-regs): Document.
      
      testsuite/
      2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>
      	    Andrew Burgess  <andrew.burgess@embecosm.com>
      
      	* gcc.target/arc/firq-1.c: New file.
      	* gcc.target/arc/firq-2.c: Likewise.
      	* gcc.target/arc/firq-3.c: Likewise.
      	* gcc.target/arc/firq-4.c: Likewise.
      	* gcc.target/arc/firq-5.c: Likewise.
      	* gcc.target/arc/firq-6.c: Likewise.
      
      Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
      
      From-SVN: r247796
      Claudiu Zissulescu committed
    • [ARC] Automatic context save/restore for regular interrupts. · 41453183
      The AUX_IRQ_CTRL register controls the behavior of automated register
      save and restore or prologue and epilogue sequences during a non-fast
      interrupt entry and exit, and context save and restore instructions.
      
      A user passes to the compiler the configuration of the AUX_IRQ_CTRL
      register via mirq-ctrl-saved option.  This option, specifies
      gneral-purposes registers that the processor saves/restores on
      interrupt entry and exit, and it is only valid for ARC EM and ARC HS
      cores.
      
      gcc/
      2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (irq_ctrl_saved): New variable.
      	(ARC_AUTOBLINK_IRQ_P): Define.
      	(ARC_AUTOFP_IRQ_P): Likewise.
      	(ARC_AUTO_IRQ_P): Likewise.
      	(irq_range): New function.
      	(arc_must_save_register): Likewise.
      	(arc_must_save_return_addr): Likewise.
      	(arc_dwarf_emit_irq_save_regs): Likewise.
      	(arc_override_options): Handle deferred options.
      	(MUST_SAVE_REGISTER): Deleted, replaced by arc_must_save_register.
      	(MUST_SAVE_RETURN_ADDR): Deleted, replaced by
      	arc_must_save_return_addr.
      	(arc_compute_frame_size): Handle automated save and restore of
      	registers.
      	(arc_expand_prologue): Likewise.
      	(arc_expand_epilogue): Likewise.
      	* config/arc/arc.md (stack_irq_dwarf): New unspec instruction.
      	* config/arc/arc.opt (mirq-ctrl-saved): New option.
      	* doc/invoke.texi (mirq-ctrl-saved): Document option.
      
      testsuite/
      2017-05-09  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/interrupt-5.c: Newfile.
      	* gcc.target/arc/interrupt-6.c: Likewise.
      	* gcc.target/arc/interrupt-7.c: Likewise.
      	* gcc.target/arc/interrupt-8.c: Likewise.
      	* gcc.target/arc/interrupt-9.c: Likewise.
      
      From-SVN: r247795
      Claudiu Zissulescu committed
    • vect-44.c: Add --param vect-max-peeling-for-alignment=0 and adjust. · 019bd543
      2017-05-09  Richard Biener  <rguenther@suse.de>
      
      	* gcc.dg/vect/vect-44.c: Add --param vect-max-peeling-for-alignment=0
      	and adjust.
      	* gcc.dg/vect/vect-50.c: Likewise.
      
      From-SVN: r247794
      Richard Biener committed
    • PR c++/70167 - array prvalue treated as lvalue · 60648580
      	* cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New.
      	(enum fcl_t): New.
      	* semantics.c (finish_compound_literal): Add fcl_context parameter.
      	Only make a static variable for C99 syntax.
      	* parser.c (cp_parser_postfix_expression): Pass it.
      	* pt.c (tsubst_copy_and_build): Likewise.
      	* call.c (extend_ref_init_temps): Set
      	DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
      
      From-SVN: r247793
      Jason Merrill committed
    • ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope typedefs. · 6c38fbc6
      	* ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
      	typedefs.
      
      From-SVN: r247791
      Nathan Sidwell committed
    • re PR c/80525 (-Wlogical-op confused by undefined integer overflow) · 684f84de
      	PR c/80525
      	* c-warn.c (unwrap_c_maybe_const): New.
      	(warn_logical_operator): Call it.
      
      	* c-c++-common/Wlogical-op-1.c: Don't use -fwrapv anymore.
      	* c-c++-common/Wlogical-op-2.c: New test.
      
      From-SVN: r247786
      Marek Polacek committed
    • c-tree.h (pushdecl): Declare. · 641da50a
      	gcc/c/
      	* c-tree.h (pushdecl): Declare.
      	gcc/cp/
      	* cp-lang.c (get_global_decls, cxx_pushdecl): New.
      	(LANG_HOOKS_GETDECLS, LANG_HOOKS_PUSHDECL): Override.
      	* name-lookup.h (pushdecl_top_level): Declare.
      	gcc/c-family/
      	* c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
      	* c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
      	gcc/objc/
      	* objc-gnu-runtime-abi-01.c (objc_add_static_instance): Use
      	pushdecl lang_hook.
      
      From-SVN: r247785
      Nathan Sidwell committed
    • * doc/invoke.texi: Fix typo. · 40abbbea
      From-SVN: r247784
      Marek Polacek committed
    • tree-vrp.c (vrp_val_is_max): Adjust comment. · 05e5efc8
      2017-05-09  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (vrp_val_is_max): Adjust comment.
      	(vrp_val_is_min): Likewise.
      	(set_value_range_to_value): Likewise.
      	(set_value_range_to_nonnegative): Likewise.
      	(gimple_assign_nonzero_p): Likewise.
      	(gimple_stmt_nonzero_p): Likewise.
      	(vrp_int_const_binop): Likewise.  Remove unreachable case.
      	(adjust_range_with_scev): Adjust comments.
      	(compare_range_with_value): Likewise.
      	(extract_range_from_phi_node): Likewise.
      	(test_for_singularity): Likewise.
      
      From-SVN: r247783
      Richard Biener committed
    • Fix broken cunroll-13.c for avr target · fd71825b
      The test reports bogus failures because the loop variable i is declared
      as int, and the constant expected in the dump doesn't fit in an int for avr.
      Fixed by explicitly using __INT32_TYPE__ for targets with __SIZEOF_INT__ < 4.
      
      gcc/testsuite/
      
      2017-05-09  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
      
      	* gcc.dg/tree-ssa/cunroll-13.c: Use __INT32_TYPE__ for
      	for targets with __SIZEOF_INT__ < 4.
      
      From-SVN: r247782
      Senthil Kumar Selvaraj committed
    • tree-vrp.c (get_single_symbol): Add assert that we don't get overflowed… · 39032dee
      tree-vrp.c (get_single_symbol): Add assert that we don't get overflowed constants as invariant part.
      
      2017-05-09  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (get_single_symbol): Add assert that we don't
      	get overflowed constants as invariant part.
      	(compare_values_warnv): Add comment before the TREE_NO_WARNING
      	checks.  Use wi::cmp instead of recursing for integer constants.
      	(compare_values): Just ignore whether we assumed undefined
      	overflow instead of failing the compare.
      	(extract_range_for_var_from_comparison_expr): Add comment before the
      	TREE_NO_WARNING sets.
      	(test_for_singularity): Likewise.
      	(extract_range_from_comparison): Do not disable optimization
      	when we assumed undefined overflow.
      	(extract_range_basic): Remove init of unused var.
      
      From-SVN: r247781
      Richard Biener committed
    • vect-50.c: Revert last change. · 4ca2e6ec
      2017-05-09  Richard Biener  <rguenther@suse.de>
      
      	* gcc.dg/vect/vect-50.c: Revert last change.
      	* gcc.dg/vect/vect-44.c: Likewise.
      
      From-SVN: r247780
      Richard Biener committed
    • tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify. · 44dedb4b
      2017-05-09  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
      	(extract_range_from_multiplicative_op_1): Adjust.
      	(extract_range_from_binary_expr_1): Use int_const_binop.
      
      From-SVN: r247779
      Richard Biener committed
    • PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c · 631238ac
      gcc/c-family/ChangeLog:
      
      	PR translation/80280
      	* c-format.h (struct format_flag_spec): Add new member.
      	(T89_T): New macro.
      	* c-format.c (local_tree_type_node): New global.
      	(printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
      	(gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
      	(strfmon_flag_specs): Likewise.
      	(gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
      	with distinct quoting properties.
      	(gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
      	(flag_chars_t::validate): Add argument and handle bad quoting.
      	(check_format_info_main): Handle quoting problems.
      	(init_dynamic_diag_info): Simplify.
      
      gcc/testsuite/ChangeLog:
      
      	PR translation/80280
      	* gcc.dg/format/gcc_diag-10.c: New test.
      
      From-SVN: r247778
      Martin Sebor committed
    • re PR target/80101 (ICE in store_data_bypass_p, at recog.c:3737) · 6ba86ba7
      gcc/testsuite/ChangeLog:
      
      2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	PR target/80101
      	* gcc.target/powerpc/pr80101-1.c: New test.
      
      
      gcc/ChangeLog:
      
      2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	PR target/80101
      	* config/rs6000/power6.md: Replace store_data_bypass_p calls with
      	rs6000_store_data_bypass_p in seven define_bypass directives and
      	in several comments.
      	* config/rs6000/rs6000-protos.h: Add prototype for
      	rs6000_store_data_bypass_p function.
      	* config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
      	function implements slightly different (rs6000-specific) semantics
      	than store_data_bypass_p, returning false rather than aborting
      	with assertion error when arguments do not satisfy the
      	requirements of store data bypass.
      	(rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
      	rs6000_store_data_bypass_p.
      
      From-SVN: r247777
      Kelvin Nilsen committed
    • Daily bump. · 6abd0017
      From-SVN: r247776
      GCC Administrator committed
  2. 08 May, 2017 21 commits
    • xtensa: add support for SSP · 5057f9e0
      gcc/
      2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
      
      	* config/xtensa/xtensa-protos.h
             	(xtensa_initial_elimination_offset): New declaration.
      	* config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
      	New function. Move its body from the INITIAL_ELIMINATION_OFFSET
      	macro definition, add case for FRAME_POINTER_REGNUM when
      	FRAME_GROWS_DOWNWARD.
      	* config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro
      	definition.
      	(INITIAL_ELIMINATION_OFFSET): Replace body with call to
      	xtensa_initial_elimination_offset.
      
      From-SVN: r247771
      Max Filippov committed
    • * doc/invoke.texi: Alphabetize -fdump options. · 26ffe694
      From-SVN: r247760
      Nathan Sidwell committed
    • re PR translation/80280 (Missing closing quote (%>) c/semantics.c and c/c-typeck.c) · ea494cd7
      gcc/ChangeLog:
      
      	PR translation/80280
      	* config/sol2-c.c (solaris_pragma_align): Correct quoting.
      
      From-SVN: r247758
      Martin Sebor committed
    • PR c++/80178 - parameter passing for uncopyable classes · f3ec182d
      	* tree.c (type_has_nontrivial_copy_init): True for classes with only
      	deleted copy/move ctors.
      	(remember_deleted_copy, maybe_warn_parm_abi): New.
      	* decl.c (require_complete_types_for_parms, check_function_type):
      	Call maybe_warn_parm_abi.
      	* call.c (convert_for_arg_passing, build_cxx_call): Likewise.
      
      From-SVN: r247757
      Jason Merrill committed
    • Bump C++ ABI version. · 49f0c04c
      	* c-opts.c (c_common_post_options): Update defaults for
      	flag_abi_version and flag_abi_compat_version.
      
      From-SVN: r247756
      Jason Merrill committed
    • re PR fortran/79930 (Potentially Missed Optimisation for MATMUL / DOT_PRODUCT) · 0f6ed121
      2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/79930
      	* frontend-passes.c (matmul_to_var_expr): New function,
      	add prototype.
      	(matmul_to_var_code):  Likewise.
      	(optimize_namespace):  Use them from gfc_code_walker.
      
      2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/79930
      	* gfortran.dg/inline_transpose_1.f90:  Add
      	-finline-matmul-limit=0 to options.
      	* gfortran.dg/matmul_5.f90:  Likewise.
      	* gfortran.dg/vect/vect-8.f90: Likewise.
      	* gfortran.dg/inline_matmul_14.f90:  New test.
      	* gfortran.dg/inline_matmul_15.f90:  New test.
      
      From-SVN: r247755
      Thomas Koenig committed
    • decl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing. · 507e429b
      	* decl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing.
      	(start_preparsed_function): Do decl pushing before setting
      	current_funciton_decl and announcing it.
      
      From-SVN: r247754
      Nathan Sidwell committed
    • re PR libfortran/80602 (Reduce stack usage for blocked matmul) · fd991039
      2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/80602
      	* m4/matmul_internal.m4:  'matmul_name`:  Change
      	t1 to a VLA of the required size.
              * generated/matmul_c10.c: Regenerated.
              * generated/matmul_c16.c: Regenerated.
              * generated/matmul_c4.c: Regenerated.
              * generated/matmul_c8.c: Regenerated.
              * generated/matmul_i1.c: Regenerated.
              * generated/matmul_i16.c: Regenerated.
              * generated/matmul_i2.c: Regenerated.
              * generated/matmul_i4.c: Regenerated.
              * generated/matmul_i8.c: Regenerated.
              * generated/matmul_r10.c: Regenerated.
              * generated/matmul_r16.c: Regenerated.
              * generated/matmul_r4.c: Regenerated.
              * generated/matmul_r8.c: Regenerated.
      
      2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/80602
      	* gfortran.dg/matmul_15.f90:  New test case.
      
      From-SVN: r247753
      Thomas Koenig committed
    • name-lookup.h (pushdecl_with_scope): Replace with ... · d16d5eac
      	* name-lookup.h (pushdecl_with_scope): Replace with ...
      	(pushdecl_outermost_localscope): ... this.
      	* name-lookup.c (pushdecl_with_scope): Replace with ...
      	(pushdecl_outermost_localscope): ... this.
      	(pushdecl_namespace_level): Adjust.
      	* decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope.
      	* lambda.c (insert_capture_proxy): Likewise.
      
      From-SVN: r247752
      Nathan Sidwell committed
    • target.def (compute_frame_layout): New optional target hook. · 29eb9a44
      2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * target.def (compute_frame_layout): New optional target hook.
              * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
              * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
              * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
              target hook.
              * reload1.c (verify_initial_elim_offsets): Likewise.
              * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
              (use_simple_return_p): Call arm_compute_frame_layout if needed.
              (arm_get_frame_offsets): Split up into this ...
              (arm_compute_frame_layout): ... and this function.
      
      From-SVN: r247750
      Bernd Edlinger committed
    • Tweak static assertions in std::optional · 9057edd3
      	* include/std/optional: Use a separate static_assert per condition.
      	* testsuite/20_util/optional/cons/value_neg.cc: Update dg-error line
      	numbers.
      
      From-SVN: r247748
      Jonathan Wakely committed
    • class.c (build_vtbl_initializer): Don't shadow outer variable with static var. · 7574e458
      	* class.c (build_vtbl_initializer): Don't shadow outer variable
      	with static var.
      
      From-SVN: r247747
      Nathan Sidwell committed
    • [AArch64] Tighten move constraints for symbolic operands · 564cf83d
      The movsi and movdi constraints allowed the source to be any
      absolute symbolic expression ("S").  That's OK for operands that
      have already been vetted by the aarch64_mov_operand predicate but
      causes problems if the register allocator substitutes an equivalence
      (the usual "the constraints can't accept more than the predicates"
      restriction).
      
      Although all other uses of "S" in the backend are redundant and could
      in principle be removed, "S" itself is a publicly-documented constraint
      and so we'd have to keep its definition.  This patch therefore adds a
      new "Usa" constraint for legitimate absolute address operands.
      
      2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/aarch64/constraints.md (Usa): New constraint.
      	* config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
      
      From-SVN: r247746
      Richard Sandiford committed
    • Revert _binding -> _value change. · 06aa5490
      	* name-lookup.h (get_namespace_value, set_global_value): Rename to
      	...
      	(get_namespace_binding, set_global_binding): ... these.
      	* name-lookup.c (get_namespace_value, set_global_value): Rename to
      	...
      	(get_namespace_binding, set_global_binding): ... these.
      	(arg_assoc_namespace, pushdecl_maybe_friend_1)
      	check_for_out_of_scope_variable, push_overloaded_decl_1,
      	lookup_name_innermost_nonclass_level, push_namespace): Adjust.
      	* cp-tree.h (IDENTIFIER_GLOBAL_VALUE)
      	SET_IDENTIFIER_GLOBAL_VALUE): Adjust.
      	* decl.c (poplevel): Adjust.
      	* pt.c (make_constrained_auto): Likewise.
      ((--This line, and those below, will be ignored--
      
      M    cp/cp-tree.h
      M    cp/name-lookup.c
      M    cp/name-lookup.h
      M    cp/decl.c
      M    cp/ChangeLog
      M    cp/pt.c
      
      From-SVN: r247745
      Nathan Sidwell committed
    • * es.po, sv.po: Update. · 1e5c2400
      From-SVN: r247743
      Joseph Myers committed
    • Clarify mt_allocator documentation w.r.t deallocation · 6d430cbd
      	* doc/xml/manual/mt_allocator.xml: Clarify deallocation behaviour.
      	* doc/html/*: Regenerate.
      
      From-SVN: r247742
      Jonathan Wakely committed
    • Define TM_MULTILIB_CONFIG for ARM multilib · c2f46874
      TM_MULTILIB_CONFIG is not set in config.gcc when building with multilib
      for arm targets, leading to config/arm/t-multilib not including any of
      the files (t-aprofile and t-rmprofile) definining the architecture and
      FPU to build multilib for. This patch fixes that by setting
      TM_MULTILIB_CONFIG to with_multilib_list's value after it has been
      checked. It also fix a trailing whitespace issue.
      
      2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
          with_multilib_list after it has been checked.
      
      From-SVN: r247741
      Thomas Preud'homme committed
    • tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy. · a92464dd
      2017-05-08  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
      	(bitmap_set_subtract_values): Likewise.
      
      From-SVN: r247739
      Richard Biener committed
    • tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ... · da11a720
      2017-05-08  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
      	(gimple_assign_nonzero): ... this and remove strict_overflow_p
      	argument.
      	(gimple_stmt_nonzero_warnv_p): Rename to ...
      	(gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
      	argument.
      	(vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
      	(extract_range_basic): Adjust, do not disable propagation on
      	strict overflow sensitive simplification.
      	(vrp_visit_cond_stmt): Likewise.
      
      From-SVN: r247738
      Richard Biener committed
    • This fixes a few failures on ARM and AArch64 due to a recent change in... · 18b8c294
      This fixes a few failures on ARM and AArch64 due to a recent change in
      alignment peeling by switching the vector cost model off.
      
      Tested on AArch64, ARM and x64 - committed as obvious.
      
          testsuite/
      	* gcc.dg/vect/vect-44.c: Add -fno-vect-cost-model.
      	* gcc.dg/vect/vect-50.c: Likewise.
      
      From-SVN: r247737
      Wilco Dijkstra committed
    • Daily bump. · 41e97de9
      From-SVN: r247733
      GCC Administrator committed
  3. 07 May, 2017 3 commits