Commit Graph

151608 Commits

Author SHA1 Message Date
Arnaud Charlet 89a53f83d8 [multiple changes]
2017-01-20  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Access_Type_Declaration): Protect access to the
	Entity attribute.
	* sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
	* sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
	malformed trees.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specification, case
	Dynamic_Predicate): If the entity E is a subtype that inherits
	a static predicate for its parent P,, the inherited and the
	new predicate combine in the generated predicate function,
	and E only has a dynamic predicate.

2017-01-20  Tristan Gingold  <gingold@adacore.com>

	* s-boustr.ads, s-boustr.adb: New package.
	* Makefile.rtl: Add s-boustr.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* inline.adb (Process_Formals): Qualify the
	expression of a return statement when it yields a universal type.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Freeze_All): Freeze the default
	expressions of all eligible formal parameters that appear in
	entries, entry families, and protected subprograms.

From-SVN: r244701
2017-01-20 11:42:43 +01:00
Arnaud Charlet 4f324de225 Minor reformatting.
From-SVN: r244700
2017-01-20 11:38:54 +01:00
Arnaud Charlet f68fc405bb [multiple changes]
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
2017-01-20 11:38:41 +01:00
Arnaud Charlet f4ef7b06ce [multiple changes]
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
2017-01-20 11:36:01 +01:00
Arnaud Charlet 8f1fe1f8ce Minor reformatting.
From-SVN: r244697
2017-01-20 11:32:34 +01:00
Arnaud Charlet ce06d6418f [multiple changes]
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
2017-01-20 11:31:58 +01:00
Arnaud Charlet 17d302ec03 Revert previous change.
From-SVN: r244695
2017-01-20 11:30:28 +01:00
Arnaud Charlet 49779c98ff [multiple changes]
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
2017-01-20 11:20:02 +01:00
Martin Liska 0ce4024a35 Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188).
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
2017-01-20 09:45:04 +00:00
Martin Liska 2d8d3ae293 Fix IPA CP where it forgot to add a reference in cgraph (PR ipa/71190).
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
2017-01-20 08:44:35 +00:00
Martin Liska a809d56440 Fix --enable-gather-detailed-mem-stats
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
2017-01-20 08:41:22 +00:00
Andrew Senkevich d8ea3e7c3c Add AVX512 k-mask intrinsics.
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
2017-01-20 08:37:13 +00:00
Jakub Jelinek 8d67fcd84e re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
liboffloadmic/
	* aclocal.m4: Regenerated.
	* Makefile.in: Regenerated.
libcilkrts/
	* aclocal.m4: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244684
2017-01-20 09:27:29 +01:00
Richard Biener 0516164b36 re PR tree-optimization/71264 (ICE in convert_move)
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
2017-01-20 08:01:27 +00:00
Jason Merrill b2c06d0530 US 20 - forwarding references and class template argument deduction
* 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
2017-01-19 23:43:19 -05:00
Jason Merrill 689f867c9c US 19 - deduction guides and constructors
* 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
2017-01-19 23:43:13 -05:00
Jonathan Wakely a3a1620bb8 PR72792 PR72793 relax requirements on rebind members
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
2017-01-20 02:36:16 +00:00
Ian Lance Taylor 198766b648 re PR go/79146 (Bootstrapping go on s390x fails; redefined symbols)
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
2017-01-20 02:27:46 +00:00
Jonathan Wakely 38a9e5a6c0 PR69321 fix any_cast<T>(any*) for non-copyable T
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
2017-01-20 01:22:54 +00:00
Segher Boessenkool 01334be4a0 rs6000: Fix the new SSP guard configuration code (PR79140)
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
2017-01-20 02:22:27 +01:00
Matthew Fortune d821744c63 config.gcc (supported_defaults): Add madd4.
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
2017-01-19 20:05:25 -05:00
Jonathan Wakely 5b4ca3060a PR64903 simplify last fix to std::is_partitioned
PR libstdc++/64903
	* include/bits/stl_algo.h (is_partitioned): Use increment instead of
	std::advance.

From-SVN: r244675
2017-01-20 00:33:25 +00:00
Jiong Wang f2f6dece0e [AArch64, libgcc] Add missing file, forget "svn add"
From-SVN: r244674
2017-01-20 00:21:34 +00:00
Jiong Wang 5636faf2bc [AArch64][4/4] libgcc unwinder support for return address signing
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
2017-01-20 00:19:01 +00:00
GCC Administrator 1d9a762962 Daily bump.
From-SVN: r244672
2017-01-20 00:16:18 +00:00
Jiong Wang 312492bd5e [AArch64][3/4] New PAUTH builtins required by libgcc unwinder
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
2017-01-20 00:10:11 +00:00
Jonathan Wakely 115ac9ff61 PR79156 fix std::__enable_shared_from_this extension
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
2017-01-20 00:07:14 +00:00
Jiong Wang 27169e45d4 [AArch64][2/4] Generate dwarf information for -msign-return-address
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
2017-01-20 00:05:30 +00:00
Jiong Wang db58fd8954 [AArch64][1/4] Support Return address protection on AArch64
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
2017-01-20 00:03:20 +00:00
Matthew Fortune c9038c70bd MIPS: Documentation fix for -mlxc1-sxc1
gcc/

	* doc/invoke.texi: Add missing -mlxc1-sxc1 options to
	overall option summary.

From-SVN: r244665
2017-01-19 23:58:10 +00:00
Jiong Wang d766c52b7b [AArch64] Add commandline support for -march=armv8.3-a
gcc/
	* config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
	* config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
	AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
	* doc/invoke.texi (AArch64 Options): Document "armv8.3-a".

From-SVN: r244663
2017-01-19 23:51:49 +00:00
Michael Meissner bd9cf60b31 rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable -mpower9-minmax by default for -mcpu=power9.
[gcc]
2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
	-mpower9-minmax by default for -mcpu=power9.
	(ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
	128-bit floating point.

[gcc/testsuite]
2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/float128-hw.c: Do not require IEEE 128-bit
	floating point hardware to run test.

From-SVN: r244662
2017-01-19 23:31:20 +00:00
Jonathan Wakely c4e5baa663 PR64903 fix number of predicate tests in std::is_partitioned
PR libstdc++/64903
	* include/bits/stl_algo.h (is_partioned): Don't retest the partition
	point.
	* testsuite/25_algorithms/is_partitioned/2.cc: New test.

From-SVN: r244661
2017-01-19 23:30:18 +00:00
Alan Modra 945a01f921 [RS6000] Don't expand strcmp and strncmp inline when -Os
* config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
	optimizing for size.

From-SVN: r244660
2017-01-20 09:51:53 +10:30
Alan Modra 5699b9d115 [RS6000] PR79144, cmpstrnsi optimization breaks glibc
glibc compiled with current gcc-7 fails one test due to strcmp and
strncmp appearing in the PLT.  This is because the inline expansion of
those functions falls back to a function call, but doesn't use the asm
name for the call.

	PR target/79144
	* config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
	for strcmp and strncmp from corresponding builtin decl.

From-SVN: r244659
2017-01-20 09:49:19 +10:30
Jonathan Wakely 8e4160112d Fix typo in recent doc updates
* doc/xml/manual/abi.xml: Fix typo.
	* doc/html/manual/abi.html: Likewise.

From-SVN: r244658
2017-01-19 23:15:13 +00:00
Louis Krupp 02a7f8dc97 Add missing period at end of -ftest-forall-temp option text.
From-SVN: r244657
2017-01-19 23:09:45 +00:00
Jonathan Wakely 437f43cc78 PR67085 pass comparison functions by reference in heap algorithms
PR libstdc++/67085
	* include/bits/predefined_ops.h (_Iter_less_val, _Val_less_iter): Add
	converting constructors from _Iter_less_iter.
	(_Iter_comp_val, _Val_comp_iter): Add converting constructors from
	_Iter_comp_iter.
	(__iter_comp_val(_Iter_comp_iter<C>): Use converting constructor.
	(__val_comp_iter(_Iter_comp_iter<C>): Likewise.
	* include/bits/stl_heap.h (__is_heap_until, __push_heap, __pop_heap)
	(__make_heap, __sort_heap): Change _Compare parameters to references.
	(__is_heap, push_heap, __adjust_heap, __pop_heap, pop_heap)
	(__make_heap, make_heap, sort_heap, is_heap_until): Pass comparison
	functions as lvalues.
	(is_heap): Call __is_heap_until directly to avoid copying __comp.
	* testsuite/23_containers/priority_queue/67085.cc: Adjust test to
	count copies during construction with empty sequence.

From-SVN: r244656
2017-01-19 23:07:52 +00:00
Uros Bizjak d445d739b9 config.gcc (x86_64-*-rtems*): Use i386/rtemself.h instead of i386/rtems-64.h.
* config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
	instead of i386/rtems-64.h.
	* config/i386/rtems-64.h: Remove.

From-SVN: r244655
2017-01-19 23:00:17 +01:00
Uros Bizjak fa9205536c re PR target/78478 (Compile Error for i386-rtems)
PR target/78478
	Revert:
	2013-11-05  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.

From-SVN: r244653
2017-01-19 22:38:44 +01:00
Uros Bizjak 7b32a8f61f re PR target/78478 (Compile Error for i386-rtems)
PR target/78478
	* config/ax_check_define.m4: New file.

libgfortran/ChangeLog:

	PR target/78478
	* acinclude.m4: Include ../config/ax_check_define.m4
	* configure.ac: Check if _SOFT_FLOAT is defined.
	* configure.host (i?86 | x86_64): Use fpu-generic when
	have_soft_float is set.
	* configure: Regenerate.

From-SVN: r244651
2017-01-19 22:00:53 +01:00
Jonathan Wakely 9ade9945a0 Fix unsafe moves inside loops
PR libstdc++/67085
	* include/bits/stl_heap.h (__is_heap): Use _GLIBCXX_MOVE.
	(__make_heap, __sort_heap): Don't use _GLIBCXX_MOVE inside loops.
	* testsuite/23_containers/priority_queue/67085.cc: Adjust expected
	number of copies.
	* testsuite/25_algorithms/make_heap/movable.cc: New test.

From-SVN: r244650
2017-01-19 20:29:07 +00:00
Tamar Christina ab014eb3ae aarch64.c (aarch64_simd_gen_const_vector_dup): Change int to HOST_WIDE_INT.
gcc/
2017-01-19  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
	Change int to HOST_WIDE_INT.
	* config/aarch64/aarch64-protos.h
	(aarch64_simd_gen_const_vector_dup): Likewise.
	* config/aarch64/aarch64-simd.md: Add copysign<mode>3.

gcc/testsuite/
2017-01-19  Tamar Christina  <tamar.christina@arm.com>

	* gcc/testsuite/lib/target-supports.exp
	(check_effective_target_vect_call_copysignf): Enable for AArch64.

From-SVN: r244649
2017-01-19 18:30:44 +00:00
Jonathan Wakely 45b48129d5 PR67085 move comparison functions in heap operations
PR libstdc++/67085
	* include/bits/stl_heap.h (push_heap, __adjust_heap, __pop_heap)
	(pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Use
	_GLIBCXX_MOVE when passing comparison function to other functions.
	(is_heap_until, is_heap): Use std::move when passing comparison
	function.
	* testsuite/23_containers/priority_queue/67085.cc: New test.

From-SVN: r244648
2017-01-19 18:26:41 +00:00
Rainer Orth c048038f8d Fix gcc.dg/attr-alloc_size-4.c on i?86 (PR testsuite/79051)
PR testsuite/79051
	* gcc.dg/attr-alloc_size-4.c (test_int_range) [__i386__ ||
	__x86_64__]: Allow for target i?86-*-*.

From-SVN: r244647
2017-01-19 17:42:50 +00:00
David Malcolm 8a3a6ab451 Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default
gcc/jit/ChangeLog:
	* dummy-frontend.c (jit_langhook_type_for_size): Delete.
	(LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.

gcc/ChangeLog:
	* langhooks-def.h (lhd_type_for_size): New decl.
	(LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
	* langhooks.c (lhd_type_for_size): New function, taken from
	lto_type_for_size.

gcc/lto/ChangeLog:
	* lto-lang.c (builtin_type_for_size): Convert call to
	lto_type_for_size to one through the langhook.
	(lto_type_for_size): Move to langhooks.c and rename to
	lhd_type_for_size.
	(LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.

From-SVN: r244646
2017-01-19 17:27:54 +00:00
Pat Haugen 86eb502b93 power9.md (power9-alu): Remove 'cmp' type and add define_bypass for CR latency.
* config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
	define_bypass for CR latency.
	(power9-cracked-alu): Update bypass latency and remove power9-branch.
	(power9-alu2): Add define_bypass for CR latency.
	(power9-cmp): New.
	(power9-mul): Update insn latency.
	(power9-mul-compare): Update insn latency, bypass latency and remove
	power9-branch.

From-SVN: r244645
2017-01-19 17:11:34 +00:00
Uros Bizjak 16a34ca6ac target.h (htm_available): Determine vendor from __get_cpuid_max return.
* config/x86/target.h (htm_available): Determine vendor from
	__get_cpuid_max return.  Use signature_INTEL_ebx.  Cleanup.

From-SVN: r244644
2017-01-19 18:10:40 +01:00
Kyrylo Tkachov 197d1c095d [AArch64] Purge leftover occurrences of aarch64_nopcrelative_literal_loads
* config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
	Delete.
	* config/aarch64/aarch64.md
	(aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
	aarch64_nopcrelative_literal_loads.
	(aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.

From-SVN: r244643
2017-01-19 16:59:43 +00:00
Jonathan Wakely 8c05647c56 PR78905 define _GLIBCXX_RELEASE macro
PR libstdc++/78905
	* doc/xml/manual/abi.xml (abi.versioning.history): Add markup to
	macro names, filenames, and literal values. Document _GLIBCXX_RELEASE.
	Document that the deprecated _GLIBCXX_VERSION macro was removed for
	the 4.0.0 release.
	* doc/html/*: Regenerate.
	* include/Makefile.am (_GLIBCXX_RELEASE): Set value.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config (_GLIBCXX_RELEASE): Add #define.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Use lineno of 0 in
	dg-error.

From-SVN: r244642
2017-01-19 16:40:46 +00:00