1. 20 Jan, 2017 27 commits
    • [multiple changes] · f68fc405
      2017-01-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
      	for illegal inherited Implicit_Dereference aspects with renamed
      	discriminants.
      
      2017-01-20  Javier Miranda  <miranda@adacore.com>
      
      	* debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
      	* nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
      	* nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
      	(Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
      	Set_Prev, Tree_Read): Adding assertion.
      	* atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
      	* atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
      	(Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
      	Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
      	Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
      	Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
      	Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
      	Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
      	Set_ListN_With_Parent): Adding assertion.
      
      2017-01-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_prag.adb (Process_Convention): Diagnose properly a pragma
      	import that applies to several homograph subprograms. when one
      	of them is declared by a subprogram body.
      
      2017-01-20  Justin Squirek  <squirek@adacore.com>
      
      	* exp_ch6.adb (Expand_Call): Remove optimization
      	that nulls out calls to null procedures.
      
      From-SVN: r244699
      Arnaud Charlet committed
    • [multiple changes] · f4ef7b06
      2017-01-20  Yannick Moy  <moy@adacore.com>
      
      	* inline.adb (Expand_Inlined_Call): Keep more
      	precise type of actual for inlining whenever possible. In
      	particular, do not switch to the formal type in GNATprove mode in
      	some case where the GNAT backend might require it for visibility.
      
      2017-01-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
      	aspect Implicit_Dereference can be inherited by a full view if
      	the partial view has no discriminants, because there is no way
      	to apply the aspect to the partial view.
      	(Build_Derived_Record_Type): If derived type renames discriminants
      	of the parent, the new discriminant inherits the aspect from
      	the old one.
      	* sem_ch4.adb (Analyze_Call): Handle properly a parameterless
      	call through an access discriminant designating a subprogram.
      	* sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
      	properly a parameterless call through an access discriminant on
      	the left-hand side of an assignment.
      	* sem_res.adb (resolve): If an interpreation involves a
      	discriminant with an implicit dereference and the expression is an
      	entity, resolution takes place later in the appropriate routine.
      	* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
      	access discriminants that designate a subprogram type.
      
      2017-01-20  Pascal Obry  <obry@adacore.com>
      
      	* a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
      
      From-SVN: r244698
      Arnaud Charlet committed
    • Minor reformatting. · 8f1fe1f8
      From-SVN: r244697
      Arnaud Charlet committed
    • [multiple changes] · ce06d641
      2017-01-20  Yannick Moy  <moy@adacore.com>
      
      	* sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
      	on implicitly with'ed units in GNATprove mode.
      	* sinfo.ads (Implicit_With): Document use of flag for implicitly
      	with'ed units in GNATprove mode.
      
      2017-01-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
      	unit Do not report an error on a non-static entity that appears
      	in the context of a spec expression, such as an aspect expression.
      
      2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
      	(Is_Underlying_Full_View): New routine.
      	(Set_Is_Underlying_Full_View): New routine.
      	(Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
      	* einfo.ads Add new attribute Is_Underlying_Full_View.
      	(Is_Underlying_Full_View): New routine along with pragma Inline.
      	(Set_Is_Underlying_Full_View): New routine along with pragma Inline.
      	* exp_util.adb (Build_DIC_Procedure_Body): Do not consider
      	class-wide types and underlying full views. The first subtype
      	is used as the working type for all Itypes, not just array base types.
      	(Build_DIC_Procedure_Declaration): Do not consider
      	class-wide types and underlying full views. The first subtype
      	is used as the working type for all Itypes, not just array
      	base types.
      	* freeze.adb (Freeze_Entity): Inherit the freeze node of a full
      	view or an underlying full view without clobbering the attributes
      	of a previous freeze node.
      	(Inherit_Freeze_Node): New routine.
      	* sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
      	full view as such.
      	(Build_Underlying_Full_View): Mark an underlying full view as such.
      	* sem_ch7.adb (Install_Private_Declarations): Mark an underlying
      	full view as such.
      
      From-SVN: r244696
      Arnaud Charlet committed
    • Revert previous change. · 17d302ec
      From-SVN: r244695
      Arnaud Charlet committed
    • [multiple changes] · 49779c98
      2017-01-20  Arnaud Charlet  <charlet@adacore.com>
      
      	* exp_ch3.adb: Reenable code.
      
      2017-01-20  Yannick Moy  <moy@adacore.com>
      
      	* sinfo.ads: Document lack of Do_Division_Check flag
      	on float exponentiation.
      
      From-SVN: r244693
      Arnaud Charlet committed
    • Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188). · 0ce4024a
      2017-01-20  Martin Liska  <mliska@suse.cz>
      
      	PR lto/69188
      	* gcc.dg/lto/pr69188_0.c: New test.
      	* gcc.dg/lto/pr69188_1.c: New test.
      2017-01-20  Martin Liska  <mliska@suse.cz>
      
      	PR lto/69188
      	* tree-profile.c (init_ic_make_global_vars): Do not call
      	finalize_decl.
      	(gimple_init_gcov_profiler): Likewise.
      
      From-SVN: r244692
      Martin Liska committed
    • Fix IPA CP where it forgot to add a reference in cgraph (PR ipa/71190). · 2d8d3ae2
      2017-01-20  Martin Liska  <mliska@suse.cz>
      
      	PR ipa/71190
      	* cgraph.h (maybe_create_reference): Remove argument and
      	update comment.
      	* cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
      	argument.
      	* ipa-cp.c (create_specialized_node): Likewise.
      	* symtab.c (symtab_node::maybe_create_reference): Handle
      	VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
      
      From-SVN: r244687
      Martin Liska committed
    • Fix --enable-gather-detailed-mem-stats · a809d564
      2017-01-20  Martin Liska  <mliska@suse.cz>
      
      	* read-rtl-function.c (function_reader::create_function): Use
      	build_decl instread of build_decl_stat.
      
      From-SVN: r244686
      Martin Liska committed
    • Add AVX512 k-mask intrinsics. · d8ea3e7c
      gcc/
      	* config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
      	* config/i386/avx512dqintrin.h: Ditto.
      	* config/i386/avx512fintrin.h: Ditto.
      	* config/i386/i386-builtin-types.def: Add new types.
      	* gcc/config/i386/i386.c: Handle new types.
      	* config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
      	(__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
      	(__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
      	(__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
      	(__builtin_ia32_kshiftridi): New.
      	* config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
      
      gcc/testsuite/
      	* gcc.target/i386/avx512bw-kshiftld-1.c: New test.
      	* gcc.target/i386/avx512bw-kshiftlq-1.c: Ditto.
      	* gcc.target/i386/avx512dq-kshiftlb-1.c: Ditto.
      	* gcc.target/i386/avx512f-kshiftlw-1.c: Ditto.
      	* gcc.target/i386/avx512bw-kshiftrd-1.c: Ditto.
      	* gcc.target/i386/avx512bw-kshiftrq-1.c: Ditto.
      	* gcc.target/i386/avx512dq-kshiftrb-1.c: Ditto.
      	* gcc.target/i386/avx512f-kshiftrw-1.c: Ditto.
      	* gcc.target/i386/avx512bw-kshiftld-2.c: Ditto.
      	* gcc.target/i386/avx512bw-kshiftlq-2.c: Ditto.
      	* gcc.target/i386/avx512bw-kshiftrd-2.c: Ditto.
      	* gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
      	* gcc.target/i386/avx512dq-kshiftlb-2.c: Ditto.
      	* gcc.target/i386/avx512dq-kshiftrb-2.c: Ditto.
      	* gcc.target/i386/avx512f-kshiftlw-2.c: Ditto.
      	* gcc.target/i386/avx512f-kshiftrw-2.c: Ditto.
      	* gcc.target/i386/avx-1.c: Test new intrinsics.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      
      From-SVN: r244685
      Andrew Senkevich committed
    • re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) · 8d67fcd8
      	PR other/79046
      liboffloadmic/
      	* aclocal.m4: Regenerated.
      	* Makefile.in: Regenerated.
      libcilkrts/
      	* aclocal.m4: Regenerated.
      	* Makefile.in: Regenerated.
      
      From-SVN: r244684
      Jakub Jelinek committed
    • re PR tree-optimization/71264 (ICE in convert_move) · 0516164b
      2017-01-20  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/71264
      	* gcc.dg/vect/pr71264.c: Make sure memory is aligned.
      
      From-SVN: r244683
      Richard Biener committed
    • US 20 - forwarding references and class template argument deduction · b2c06d05
      	* cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
      	* pt.c (push_template_decl_real): Set it.
      	(maybe_adjust_types_for_deduction): Check it.
      	(rewrite_template_parm): Copy it.
      
      From-SVN: r244682
      Jason Merrill committed
    • US 19 - deduction guides and constructors · 689f867c
      	* call.c (joust): Prefer deduction guides to constructors.
      	* pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
      	(deduction_guide_p): Check DECL_P.
      
      From-SVN: r244681
      Jason Merrill committed
    • PR72792 PR72793 relax requirements on rebind members · a3a1620b
      	PR libstdc++/72792
      	PR libstdc++/72793
      	* include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
      	Replace with class template using void_t.
      	(__alloc_rebind): Define in terms of
      	__allocator_traits_base::__rebind.
      	(allocator_traits): Remove unconditional static_assert for
      	rebind_alloc.
      	* include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
      	(pointer_traits::__rebind): Replace with class template using void_t.
      	(pointer_traits::rebind): Define in terms of __rebind.
      	(pointer_traits): Remove unconditional static_assert for rebind.
      	* testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
      	* testsuite/20_util/pointer_traits/rebind.cc: New test.
      
      From-SVN: r244680
      Jonathan Wakely committed
    • re PR go/79146 (Bootstrapping go on s390x fails; redefined symbols) · 198766b6
      	PR go/79146
          crypto/elliptic: explicitly ignore p256_s390x.go
          
          The file only works if used in conjunction with assembly code not
          (yet) written for gccgo.
          
          Fixes GCC PR 79146.
      
          Reviewed-on: https://go-review.googlesource.com/35477
      
      From-SVN: r244679
      Ian Lance Taylor committed
    • PR69321 fix any_cast<T>(any*) for non-copyable T · 38a9e5a6
      	PR libstdc++/69321
      	* include/experimental/any (__any_caster): Avoid instantiating
      	manager function for types that can't be stored in any.
      	* include/std/any (__any_caster): Likewise.
      	* testsuite/20_util/any/misc/any_cast.cc: Test non-copyable type.
      	* testsuite/experimental/any/misc/any_cast.cc: Likewise.
      
      From-SVN: r244678
      Jonathan Wakely committed
    • rs6000: Fix the new SSP guard configuration code (PR79140) · 01334be4
      I foolishly tested this with r241087 reverted.  After that revision
      default_stack_protect_guard is no longer called if the compiler defaults
      to using the TLS guard, which of course is the wrong thing to do if
      there is some other way to enable the global guard.
      
      This fixes it.
      
      
      	PR target/78875
      	PR target/79140
      	* config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
      	define to rs6000_init_stack_protect_guard.
      	(rs6000_init_stack_protect_guard): New function.
      
      From-SVN: r244677
      Segher Boessenkool committed
    • config.gcc (supported_defaults): Add madd4. · d821744c
      gcc/
      2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
      	    Yunqiang Su  <yunqiang.su@imgtec.com>
      
      	* config.gcc (supported_defaults): Add madd4.
      	(with_madd4): Add validation.
      	(all_defaults): Add madd4.
      	* config/mips/mips.opt (mmadd4): New option.
      	* gcc/config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
      	mmadd4.
      	(TARGET_CPU_CPP_BUILTINS): Add builtin_define for
      	__mips_no_madd4.
      	(ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
      	(ISA_HAS_FUSED_MADD4): Likewise.
      	* gcc/doc/invoke.texi (-mmadd4): Document the new option.
      	* gcc/doc/install.texi (--with-madd4): Document the new option.
      
      gcc/testsuite/
      2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
      
      	* gcc.target/mips/madd4-1.c: New file.
      	* gcc.target/mips/madd4-2.c: Likewise.
      	* gcc.target/mips/mips.exp (mips_option_groups): Add ghost option
      	HAS_MADD4.
      	(mips_option_groups): Add -m[no-]madd4.
      	(mips-dg-init): Detect default -mno-madd4.
      	(mips-dg-options): Handle HAS_MADD4 arch upgrade/downgrade.
      	* gcc.target/mips/mips-ps-type.c: Add -mmadd4 test option.
      	* gcc.target/mips/mips-ps-type-2.c: Likewise.
      	* gcc.target/mips/nmadd-1.c: Likewise.
      	* gcc.target/mips/nmadd-2.c: Likewise.
      	* gcc.target/mips/nmadd-3.c: Likewise.
      
      Co-Authored-By: Yunqiang Su <yunqiang.su@imgtec.com>
      
      From-SVN: r244676
      Matthew Fortune committed
    • PR64903 simplify last fix to std::is_partitioned · 5b4ca306
      	PR libstdc++/64903
      	* include/bits/stl_algo.h (is_partitioned): Use increment instead of
      	std::advance.
      
      From-SVN: r244675
      Jonathan Wakely committed
    • [AArch64, libgcc] Add missing file, forget "svn add" · f2f6dece
      From-SVN: r244674
      Jiong Wang committed
    • [AArch64][4/4] libgcc unwinder support for return address signing · 5636faf2
      libgcc/
      	* config/aarch64/aarch64-unwind.h: New file.
      	(DWARF_REGNUM_AARCH64_RA_STATE): Define.
      	(MD_POST_EXTRACT_ROOT_ADDR): New target marcro and define it on AArch64.
      	(MD_POST_EXTRACT_FRAME_ADDR): Likewise.
      	(MD_POST_FROB_EH_HANDLER_ADDR): Likewise.
      	(MD_FROB_UPDATE_CONTEXT): Define it on AArch64.
      	(aarch64_post_extract_frame_addr): New function.
      	(aarch64_post_frob_eh_handler_addr): New function.
      	(aarch64_frob_update_context): New function.
      	* config/aarch64/linux-unwind.h: Include aarch64-unwind.h
      	* config.host (aarch64*-*-elf, aarch64*-*-rtems*,
      	aarch64*-*-freebsd*):
      	Initialize md_unwind_header to include aarch64-unwind.h.
      	* unwind-dw2.c (struct _Unwind_Context): Define "RA_A_SIGNED_BIT".
      	(execute_cfa_program): Multiplex DW_CFA_GNU_window_save for
      	__aarch64__.
      	(uw_update_context): Honor MD_POST_EXTRACT_FRAME_ADDR.
      	(uw_init_context_1): Honor MD_POST_EXTRACT_ROOT_ADDR.
      	(uw_frob_return_addr): New function.
      	(uw_install_context): Use uw_frob_return_addr.
      
      From-SVN: r244673
      Jiong Wang committed
    • Daily bump. · 1d9a7629
      From-SVN: r244672
      GCC Administrator committed
    • [AArch64][3/4] New PAUTH builtins required by libgcc unwinder · 312492bd
      gcc/
      	* config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
      	entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
      	AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
      	(aarch64_init_pauth_hint_builtins): New.
      	(aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
      	(aarch64_expand_builtin): Expand new builtins.
      
      From-SVN: r244669
      Jiong Wang committed
    • PR79156 fix std::__enable_shared_from_this extension · 115ac9ff
      	PR libstdc++/79156
      	* include/bits/shared_ptr_base.h (__enable_shared_from_this_base):
      	Fix return type.
      	(__enable_shared_from_this): Declare __shared_ptr as a friend.
      	* testsuite/ext/shared_ptr/1.cc: New test.
      
      From-SVN: r244668
      Jonathan Wakely committed
    • [AArch64][2/4] Generate dwarf information for -msign-return-address · 27169e45
      gcc/
      	* reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
      	* combine-stack-adj.c (no_unhandled_cfa): Handle
      	REG_CFA_TOGGLE_RA_MANGLE.
      	* dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
      	* config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
      	info for return address signing.
      	(aarch64_expand_epilogue): Likewise.
      
      From-SVN: r244667
      Jiong Wang committed
    • [AArch64][1/4] Support Return address protection on AArch64 · db58fd89
      gcc/
      	* config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
      	* config/aarch64/aarch64-protos.h
      	(aarch64_return_address_signing_enabled): New declaration.
      	* config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
      	New function.
      	(aarch64_expand_prologue): Sign return address before it's pushed onto
      	stack.
      	(aarch64_expand_epilogue): Authenticate return address fetched from
      	stack.
      	(aarch64_override_options): Sanity check for ILP32 and ISA level.
      	(aarch64_attributes): New function attributes for "sign-return-address".
      	* config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
      	UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
      	("*do_return"): Generate combined instructions according to key index.
      	("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
      	* config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
      	iterators.
      	(pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
      	* config/aarch64/aarch64.opt (msign-return-address=): New.
      	* doc/extend.texi (AArch64 Function Attributes): Documents
      	"sign-return-address=".
      	* doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
      
      gcc/testsuite/
      	* gcc.target/aarch64/return_address_sign_1.c: New testcase for no
      	combined instructions.
      	* gcc.target/aarch64/return_address_sign_2.c: New testcase for combined
      	instructions.
      	* gcc.target/aarch64/return_address_sign_3.c: New testcase for disable
      	of pointer authentication.
      
      From-SVN: r244666
      Jiong Wang committed
  2. 19 Jan, 2017 13 commits