1. 18 Jul, 2017 20 commits
  2. 17 Jul, 2017 20 commits
    • alpha.c: Include predict.h. · 8cdf5397
      	* config/alpha/alpha.c: Include predict.h.
      
      From-SVN: r250290
      Uros Bizjak committed
    • re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR) · f6489326
      2017-07-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/81162
      	* gcc.dg/pr81162.c: Move this to...
      	* gcc.dg/ubsan/pr81162.c: ...here.
      
      From-SVN: r250284
      Bill Schmidt committed
    • parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for friend outside… · dbc4ecfc
      parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for friend outside class and obsolete auto as...
      
              * parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for
              friend outside class and obsolete auto as storage-class-specifier.
      
              * g++.dg/diagnostic/friend1.C: New test.
              * g++.dg/cpp0x/auto1.C: Add check for fix-it hint.
      
      From-SVN: r250282
      Volker Reichelt committed
    • class.c (maybe_warn_about_overly_private_class): Ignore public copy ctors. · a64559a5
      	* class.c (maybe_warn_about_overly_private_class): Ignore public
      	copy ctors.
      
      	* g++.dg/warn/ctor-dtor-privacy-3.C: New.
      
      From-SVN: r250281
      Nathan Sidwell committed
    • class.c (type_has_user_declared_move_constructor, [...]): Combine into ... · 619018d4
      	* class.c (type_has_user_declared_move_constructor,
      	type_has_user_declared_move_assign): Combine into ...
      	(classtype_has_user_move_assign_or_move_ctor_p): ... this new function.
      	* cp-tree.h (type_has_user_declared_move_constructor,
      	type_has_user_declared_move_assign): Combine into ...
      	(classtype_has_user_move_assign_or_move_ctor_p): ... this. Declare.
      	* method.c (maybe_explain_implicit_delete): Use it.
      	(lazily_declare_fn): Use it.
      	* tree.c (type_has_nontrivial_copy_init): Use it.
      
      From-SVN: r250280
      Nathan Sidwell committed
    • gcc-dg.exp: Increase expect's match buffer size. · aac59577
      2017-07-17  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * lib/gcc-dg.exp: Increase expect's match buffer size.
      
      From-SVN: r250279
      Bernd Edlinger committed
    • tree-vrp.c (compare_assert_loc): Fix comparison function to return predictable results. · 5dc3163d
      2017-07-17  Yury Gribov  <tetra2005@gmail.com>
      
      gcc/
              * tree-vrp.c (compare_assert_loc): Fix comparison function
      	to return predictable results.
      
      From-SVN: r250278
      Yury Gribov committed
    • [ARC] Deprecate mexpand-adddi option. · 3f2fc95c
      Emitting subregs in the expand will result in broken code due to LRA handling of them. Issue observed while turning on mlra and mexpand-adddi options using dejagnu test suite. Deprecate this
      option.
      
      gcc/
      2017-04-26  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.md (adddi3): Remove support for mexpand-adddi
      	option.
      	(subdi3): Likewise.
      	* config/arc/arc.opt (mexpand-adddi): Deprecate it.
      	* doc/invoke.texi (mexpand-adddi): Update text.
      
      From-SVN: r250276
      Claudiu Zissulescu committed
    • [ARC] [LRA] Avoid emitting COND_EXEC during expand. · ac66951a
      Emmitting COND_EXEC rtxes during expand does introduces errors due to LRA handling of them. Issue discovered while running dejagnu test suit with mlra option on.
      
      gcc/
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
      	that also clobbers the CC register. The old expand code is moved
      	to ...
      	(*arc_clzsi2): ... here.
      	(ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
      	the CC register. The old expand code is moved to ...
      	(arc_ctzsi2): ... here.
      
      From-SVN: r250275
      Claudiu Zissulescu committed
    • [ARC] Enable indexed loads for elf targers. · f26322a6
      Enable indexed loads only for elf target, as the linux ones need more testing.
      
      gcc/
      2017-02-28  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.opt (mindexed-loads): Use initial value
      	TARGET_INDEXED_LOADS_DEFAULT.
      	(mauto-modify-reg): Use initial value
      	TARGET_AUTO_MODIFY_REG_DEFAULT.
      	* config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
      	(TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
      	* config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
      	(TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
      
      From-SVN: r250274
      Claudiu Zissulescu committed
    • semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify semantics, simplify implementation. · 5337720c
      	* semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify
      	semantics, simplify implementation.
      
      From-SVN: r250272
      Nathan Sidwell committed
    • Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302). · 26c5b549
      2017-07-17  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/81302
      	* opts.c (finish_options): Do not allow -fgnu-tm
      	w/ -fsanitize={kernel-,}address.  Say sorry.
      
      From-SVN: r250271
      Martin Liska committed
    • re PR tree-optimization/81369 (ICE in generate_code_for_partition) · 6ff37519
      	PR target/81369
      	* tree-loop-distribution.c (classify_partition): Only assert on
      	numer of iterations.
      	(merge_dep_scc_partitions): Delete prameter.  Update function call.
      	(distribute_loop): Remove code handling loop with unknown niters.
      	(pass_loop_distribution::execute): Skip loop with unknown niters.
      
      From-SVN: r250270
      Bin Cheng committed
    • re PR tree-optimization/81369 (ICE in generate_code_for_partition) · aa1528b5
      	PR target/81369
      	* tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
      	function sort_partitions_by_post_order.
      
      	gcc/testsuite
      	* gcc.dg/tree-ssa/pr81369.c: New.
      
      From-SVN: r250269
      Bin Cheng committed
    • re PR tree-optimization/81374 (ICE in bb_top_order_cmp, at tree-loop-distribution.c:391) · 3fb82452
      	PR tree-optimization/81374
      	* tree-loop-distribution.c (pass_loop_distribution::execute): Record
      	the max index of basic blocks, rather than number of basic blocks.
      
      From-SVN: r250268
      Bin Cheng committed
    • [ARC] Consolidate PIC implementation. · b6c354eb
      This patch refactors a number of functions and compiler hooks into using a
      single function which checks if a rtx is suited for pic or not. Removed
      functions are arc_legitimate_pc_offset_p and arc_legitimate_pic_operand_p
      beeing replaced by calls to arc_legitimate_pic_addr_p. Thus we have an
      unitary way of checking a rtx beeing pic.
      
      gcc/
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
      	proto.
      	(arc_legitimate_pic_operand_p): Likewise.
      	* config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
      	function.
      	(arc_needs_pcl_p): Likewise.
      	(arc_legitimate_pc_offset_p): Likewise.
      	(arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
      	function is also used in constrains.md.
      	(arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
      	validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
      	PLUS.  Only return true/false in known cases, otherwise assert.
      	(arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
      	is already called in arc_legitimate_constant_p.
      	* config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
      	pic addresses.
      	(LEGITIMATE_PIC_OPERAND_P): Use
      	arc_raw_symbolic_reference_mentioned_p function.
      	* config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
      	function.
      	(Cal): Likewise.
      	(C32): Likewise.
      
      gcc/testsuite
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/pr9000674901.c: New file.
      	* gcc.target/arc/pic-1.c: Likewise.
      	* gcc.target/arc/pr9001191897.c: Likewise.
      
      From-SVN: r250267
      Claudiu Zissulescu committed
    • [PATCH] [ARC] Add support for naked functions. · 1825c61e
      gcc/
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
                  Andrew Burgess  <andrew.burgess@embecosm.com>
      
              * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
              (arc_return_address_register): New function.
              * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
              (arc_handle_fndecl_attribute): Add naked attribute.
              (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
              (TARGET_WARN_FUNC_RETURN): Likewise.
              (arc_allocate_stack_slots_for_args): New function.
              (arc_warn_func_return): Likewise.
              (machine_function): Change type fn_type.
              (arc_compute_function_type): Consider new naked function type,
              change function return type.
              (arc_must_save_register): Adapt to handle new
              arc_compute_function_type's return type.
              (arc_expand_prologue): Likewise.
              (arc_expand_epilogue): Likewise.
              (arc_return_address_regs): Delete.
              (arc_return_address_register): New function.
              (arc_epilogue_uses): Use above function.
              * config/arc/arc.h (arc_return_address_regs): Delete prototype.
              (arc_function_type): Change encoding, add naked type.
              (ARC_INTERRUPT_P): Change to handle the new encoding.
              (ARC_FAST_INTERRUPT_P): Likewise.
              (ARC_NORMAL_P): Define.
              (ARC_NAKED_P): Likewise.
              (arc_compute_function_type): Delete prototype.
              * config/arc/arc.md (in_ret_delay_slot): Use
              arc_return_address_register function.
              (simple_return): Likewise.
              (p_return_i): Likewise.
      
      gcc/testsuite
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
                  Andrew Burgess  <andrew.burgess@embecosm.com>
      
              * gcc.target/arc/naked-1.c: New file.
              * gcc.target/arc/naked-2.c: Likewise.
      
      Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
      
      From-SVN: r250266
      Claudiu Zissulescu committed
    • re PR tree-optimization/81428 (ICE: in build_one_cst, at tree.c:2079 with -O2.… · 9ebce098
      re PR tree-optimization/81428 (ICE: in build_one_cst, at tree.c:2079 with -O2. Fixed point division.)
      
      	PR tree-optimization/81428
      	* match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
      	can't be built for those types.
      
      	* gcc.dg/fixed-point/pr81428.c: New test.
      
      From-SVN: r250265
      Jakub Jelinek committed
    • Remove stuff dead since r239246. · f986e51e
      	* config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
      	* config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
      	(avr_inform_devices): Remove dead stuff.
      
      From-SVN: r250264
      Georg-Johann Lay committed
    • gcc_update (files_and_dependencies): Remove dead entry. · 8b99a6f7
      	* gcc_update (files_and_dependencies)
      	[gcc/config/avr/avr-tables.opt]: Remove dead entry.
      
      From-SVN: r250263
      Georg-Johann Lay committed