Commit Graph

151368 Commits

Author SHA1 Message Date
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
Chenghua Xu cedb7e2c85 MIPS: Make loongson3a use fused madd.d
gcc/
	* config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
	TARGET_LOONGSON_3A.
	(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.

From-SVN: r244641
2017-01-19 16:26:32 +00:00
Matthew Fortune ab6b44cb22 MIPS: PR target/78176 add -mlxc1-sxc1.
gcc/

	PR target/78176
	* config.gcc (supported_defaults): Add lxc1-sxc1.
	(with_lxc1_sxc1): Add validation.
	(all_defaults): Add lxc1-sxc1.
	* config/mips/mips.opt (mlxc1-sxc1): New option.
	* gcc/config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
	mlxc1-sxc1.
	(TARGET_CPU_CPP_BUILTINS): Add builtin_define for
	__mips_no_lxc1_sxc1.
	(ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
	* gcc/doc/invoke.texi (-mlxc1-sxc1): Document the new option.
	* doc/install.texi (--with-lxc1-sxc1): Document the new option.

gcc/testsuite/

	* gcc.target/mips/lxc1-sxc1-1.c: New file.
	* gcc.target/mips/lxc1-sxc1-2.c: Likewise.
	* gcc.target/mips/mips.exp (mips_option_groups): Add ghost option
	HAS_LXC1.
	(mips_option_groups): Add -m[no-]lxc1-sxc1.
	(mips-dg-init): Detect default -mno-lxc1-sxc1.
	(mips-dg-options): Handle HAS_LXC1 arch upgrade/downgrade.

From-SVN: r244640
2017-01-19 16:05:59 +00:00
Jason Merrill a08895999d Array decomposition fix.
* decl.c (check_initializer): Always use build_aggr_init for array
	decomposition.

From-SVN: r244639
2017-01-19 10:59:04 -05:00
Jakub Jelinek b32e85fa42 cuda.h (CUdeviceptr): Typedef to unsigned long long even for _WIN64.
* plugin/cuda/cuda.h (CUdeviceptr): Typedef to unsigned long long even
	for _WIN64.

From-SVN: r244638
2017-01-19 16:53:51 +01:00
Andre Vehreschild 118d5ed321 re PR fortran/70696 ([Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray)
gcc/fortran/ChangeLog:

2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* trans-decl.c (gfc_build_qualified_array): Add static decl to parent
	function only, when the decl-context is not the translation unit.

gcc/testsuite/ChangeLog:

2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* gfortran.dg/coarray_43.f90: New test.

From-SVN: r244637
2017-01-19 16:52:32 +01:00
Jakub Jelinek 9db0a8c2bf re PR target/79127 (Error: invalid register for .seh_savexmm in matmul_i4.c)
PR target/79127
	* acinclude.m4 (LIBGFOR_CHECK_AVX512F): Ensure the test clobbers
	some zmm16+ registers to verify they are handled by unwind info
	properly if needed.
	* configure: Regenerated.

From-SVN: r244636
2017-01-19 16:41:15 +01:00
Jason Merrill 0655c6d556 PR c++/79130 - decomposition and direct-initialization
* init.c (build_aggr_init): Communicate direct-initialization to
	build_vec_init.
	(build_vec_init): Check for array copy sooner.
	* parser.c (cp_parser_decomposition_declaration): Remove call to
	build_x_compound_expr_from_list.

From-SVN: r244635
2017-01-19 09:37:51 -05:00
Arnaud Charlet 332429c807 Code cleanup.
From-SVN: r244634
2017-01-19 14:14:04 +01:00
Arnaud Charlet 7c323fbe3b [multiple changes]
2017-01-19  Javier Miranda  <miranda@adacore.com>

	* ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
	identifier attribute of a block-statement node. Required to avoid
	assertion failure when building the new containers library.

2017-01-19  Bob Duff  <duff@adacore.com>

	* exp_ch3.adb: Update comment.

2017-01-19  Vincent Celier  <celier@adacore.com>

	* gprep.adb (Gnatprep): Parse the definition file without
	"replace in comments" even when switch -C is used.

From-SVN: r244633
2017-01-19 14:13:19 +01:00
Arnaud Charlet 9849a7ea00 Minor reformatting.
From-SVN: r244632
2017-01-19 14:11:22 +01:00
Justin Squirek 58d27da930 exp_ch9.adb (Is_Pure_Barrier): Create function Is_Count_Attribute to identify an expansion of the 'Count attribute.
2017-01-19  Justin Squirek  <squirek@adacore.com>

	* exp_ch9.adb (Is_Pure_Barrier): Create function
	Is_Count_Attribute to identify an expansion of the 'Count
	attribute.

From-SVN: r244631
2017-01-19 14:10:58 +01:00
Arnaud Charlet 6b1d241377 [multiple changes]
2017-01-19  Pierre-Marie de Rodat  <derodat@adacore.com>

	* exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
	Emit GNAT encodings for object renamings involving record components
	whose normalized bit offset is not null.
	* uintp.h (UI_No_Uint): Declare.

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

	* sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
	statements within an element iterator loop are only analyzed
	agter the loop is rewritten. Within a generic the analysis must
	be performed in any case to complete name capture.

2017-01-19  Bob Duff  <duff@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
	before checking for unrecognized pragmas.
	Initialize Pname on its declarations; that's always good style.

From-SVN: r244630
2017-01-19 14:10:09 +01:00
Claire Dross 104c99ef18 exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the body into the tree for GNATprove by setting its Parent field.
2017-01-19  Claire Dross  <dross@adacore.com>

	* exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
	body into the tree for GNATprove by setting its Parent field. The
	components invariants of composite types are not checked by
	the composite type's invariant procedure in GNATprove mode.
	(Build_Invariant_Procedure_Declaration): Semi-insert the
	declaration into the tree for GNATprove by setting its Parent
	field.
	* freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
	the component invariants to the array type  invariant procedure
	so that the procedure can be used to  check the array type
	invariants if any.
	(Freeze_Record_Type): In GNATprove mode, do
	not add the component invariants to the record type  invariant
	procedure so that the procedure can be used to	check the record
	type invariants if any.

From-SVN: r244629
2017-01-19 14:08:16 +01:00
Arnaud Charlet 374c09e8b0 [multiple changes]
2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* lib-xref-spark_specific.adb: Minor reformatting.
	* exp_ch7.adb (Add_Parent_Invariants): Do not process array types.

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

	* fe.h (Constant_Value): Export.

From-SVN: r244628
2017-01-19 14:02:30 +01:00
Jakub Jelinek f67f94b8e2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* mpxrt/Makefile.in: Regenerated.
	* mpxwrap/Makefile.in: Regenerated.

From-SVN: r244627
2017-01-19 13:23:00 +01:00
Arnaud Charlet 54740d7d82 [multiple changes]
2017-01-19  Javier Miranda  <miranda@adacore.com>

	* exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
	Build_Back_End_Aggregate.
	(Generate_Aggregate_For_Derived_Type): Code cleanup.
	(Prepend_Stored_Values): Code cleanup.

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

	* sem_ch6.adb (Analyze_Expression_Function): Check for an
	incomplete return type after attempting to freeze it, so that
	other freeze actiona are generated in the proper order.

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

	* sem_aggr.adb (Resolve_Aggregate): If the type is a string
	type, ie. a type whose component is a character type, and the
	aggregate is positional, do not convert into a string literal
	if the index type is not an integer type, because the original
	type may be required in an enclosing operation.

2017-01-19  Bob Duff  <duff@adacore.com>

	* binde.adb, debug.adb: Enable new elaboration order algorithm
	by default. -dp switch reverts to the old algorithm.

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

	* sem_ch3.adb Add with and use clauses for Exp_Ch7.
	(Analyze_Declarations): Create the DIC and Invariant
	procedure bodies s after all freezing has taken place.
	(Build_Assertion_Bodies): New routine.
	* sem_ch7.adb Remove the with and use clauses for Exp_Ch7
	and Exp_Util.
	(Analyze_Package_Specification): Remove the
	generation of the DIC and Invariant procedure bodies. This is
	now done by Analyze_Declarations.
	* sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
	procedures are never treated as primitives.

2017-01-19  Yannick Moy  <moy@adacore.com>

	* frontend.adb: Analyze inlined bodies and check elaboration
	rules in GNATprove mode too.
	* sem_elab.adb (Delay_Element): Add Boolean component to save
	indication that call is in SPARK code.	(Check_Elab_Calls):
	Check elaboration rules in GNATprove mode, and correctly set
	the current value of SPARK_Mode.
	* lib-xref-spark_specific.adb
	(Add_SPARK_Xrefs): Simplify iteration over dereferences.

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

	* exp_ch4.adb (Expand_Concatenate): Do no enable overflow
	checks on the expression for the high bound of concatenation
	when checks are disabled, to suppress warnings about potential
	constraint errors in restricted runtimes.

From-SVN: r244626
2017-01-19 13:04:13 +01:00
Hristian Kirtchev 138fc6f10f exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the representation-to-position function as inlined.
2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
	representation-to-position function as inlined.
	* sem_cat.adb (Set_Categorization_From_Scope): Do not modify
	the purity of an internally generated entity if it has been
	explicitly marked as pure for optimization purposes.
	* exp_aggr.adb: Minor reformatting.

From-SVN: r244624
2017-01-19 13:01:01 +01:00
Richard Biener ed20a004e1 re PR rtl-optimization/72488 (wrong code (SIGFPE) at -Os and above on x86_64-linux-gnu (in the 64-bit mode))
2017-01-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/72488
	* tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
	sure to restore SSA info.
	* tree-ssa.c (verify_ssa): Verify SSA info is not shared.

From-SVN: r244623
2017-01-19 12:00:42 +00:00
Arnaud Charlet 4f94fa1186 [multiple changes]
2017-01-19  Javier Miranda  <miranda@adacore.com>

	* exp_ch6.adb (Expand_Call): Remove side effects on
	actuals that are allocators with qualified expression since the
	initialization of the object is performed by means of individual
	statements (and hence it must be done before the call).

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

	* sem_ch3.adb (Analyze_Declarations): Minor reformatting.
	(Build_Derived_Enumeration_Type): If the derived type inherits a
	dynamic predicate from its parent, the bounds of the type must
	freeze because an explicit constraint is constructed for the
	type and the corresponding range is elaborated now.

2017-01-19  Arnaud Charlet  <charlet@adacore.com>

	* sem_attr.ads: minor fix of inconsistent casing in comment
	* lib-writ.ads: minor align comments in columns
	* sem_ch3.adb: Minor reformatting.
	* spark_xrefs.ads: minor fix typo in SPARK-related comment
	* table.ads: minor style fix in comment
	* lib-xref-spark_specific.adb
	(Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
	* sem_ch12.adb: minor whitespace fix
	* freeze.adb: Add comment.
	* sem_util.adb (Unique_Name): for instances of
	generic subprograms ignore the name of the wrapper package.

2017-01-19  Javier Miranda  <miranda@adacore.com>

	* exp_aggr.adb (Resolve_Record_Aggregate):
	Factorize code needed for aggregates of limited and unlimited
	types in a new routine.
	(Pass_Aggregate_To_Back_End): New subprogram.

2017-01-19  Yannick Moy  <moy@adacore.com>

	* sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.

From-SVN: r244622
2017-01-19 12:55:21 +01:00
Arnaud Charlet 4fcf700c91 Minor reformatting and code cleanup.
From-SVN: r244621
2017-01-19 12:51:47 +01:00
Arnaud Charlet 0929d66bf8 [multiple changes]
2017-01-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
	public, for use elsewhere.
	* sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
	an Inlined_body, recognize a call that uses object notation
	and has not been rewritten as a regular call because regular
	expansion has not taken place.

2017-01-19  Bob Duff  <duff@adacore.com>

	* checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
	in case of generic formal discrete types, because it causes crashes in
	the compiler when built with assertions on.

From-SVN: r244620
2017-01-19 12:51:22 +01:00
Arnaud Charlet c63a2ad68b [multiple changes]
2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
	sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.

2017-01-19  Bob Duff  <duff@adacore.com>

	* bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
	Increment Warnings_Detected.  It was decrementing, which is
	wrong since we just issued a warning message.
	* binderr.ads (Errors_Detected, Warnings_Detected): Declare
	these variables to be of subtype Nat instead of Int, because
	they should never be negative.

2017-01-19  Javier Miranda  <miranda@adacore.com>

	* contracts.adb (Build_Postconditions_Procedure): Replace
	Generate_C_Code by Modify_Tree_For_C.
	* exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
	Replace Generate_C_Code by Modify_Tree_For_C.
	* exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
	Modify_Tree_For_C.
	* exp_ch11.adb (Expand_N_Exception_Declaration): Replace
	Generate_C_Code by Modify_Tree_For_C.
	* exp_ch4.adb (Expand_Allocator_Expression): Replace
	Generate_C_Code by Modify_Tree_For_C.
	* exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
	by Modify_Tree_For_C.
	* exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
	Generate_C_Code by Modify_Tree_For_C.
	* sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
	by Modify_Tree_For_C.
	* sinfo.ads (Modify_Tree_For_C): Adding documentation.

From-SVN: r244619
2017-01-19 12:46:14 +01:00
Arnaud Charlet 40bf00b1f8 [multiple changes]
2017-01-19  Javier Miranda  <miranda@adacore.com>

	* sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
	subprogram.
	(Is_Inlinable_Expression_Function): New subprogram.
	* exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
	to Sem_Util.
	(Is_Inlinable_Expression_Function): Moved to Sem_Util.

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

	* sem_ch4.adb (Diagnose_Call): Improve error message when a
	selected component has a prefix that might be interpreted
	as a parameterless function call, but none of the candidate
	interpretations is parameterless, and there is a hidden homonym
	of the prefix that is a package.
	* sem_ch8.adb (Find_Selected_Component): If the prefix might be
	interpreted as a parameterless function call and its analysis
	fails, do not call Analyze_Selected_Component.

From-SVN: r244618
2017-01-19 12:42:31 +01:00
Arnaud Charlet 42e2600a7a [multiple changes]
2017-01-19  Steve Baird  <baird@adacore.com>

	* sem_util.ads: Add new Use_Full_View Boolean parameter to
	Get_Index_Bounds.
	* sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
	calls to a newly-defined Scalar_Range_Of_Right_View function.

2017-01-19  Arnaud Charlet  <charlet@adacore.com>

	* gnat1drv.adb: minor fix of unbalanced parens in comment
	* lib-xref.ads (Traverse_Compilation_Unit): declaration moved
	to visible part of the package to allow re-use in GNATprove.
	* lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
	from repeated code of Traverse_Compilation_Unit.
	(Traverse_Declaration_Or_Statement): fixed detection of
	generic subprograms and packages; also, iteration over case
	statement alternatives rewritten to avoid testing if the first
	alternative is present (since it must be present due to Ada
	syntax restrictions).

From-SVN: r244617
2017-01-19 12:39:55 +01:00
Hristian Kirtchev d6e1090ae6 exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as returning by reference not just for subprogram body stubs...
2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
	returning by reference not just for subprogram body stubs,
	but for all subprogram cases.
	* sem_util.adb: Code reformatting.
	(Requires_Transient_Scope): Update the call to Results_Differ.
	(Results_Differ): Update the parameter profile and the associated
	comment on usage.

From-SVN: r244616
2017-01-19 12:37:39 +01:00
Arnaud Charlet de01377ca9 Minor reformatting.
From-SVN: r244615
2017-01-19 12:33:35 +01:00
Ed Schonberg d9049d04d5 sem_dim.adb (Analyze_Dimension): Analyze object declaration and identifier nodes that do not come from source...
2017-01-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_dim.adb (Analyze_Dimension): Analyze object declaration and
	identifier nodes that do not come from source, to handle properly
	dimensionality check within an inlined body which inclddes both
	original operands and rewritten operands. This removes spurious
	dimensionality errors in the presence of front-end inlining,
	as well as in SPARK mode.

From-SVN: r244614
2017-01-19 12:33:17 +01:00
Richard Earnshaw a57c520e2b [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift
When generating a shift from an extended value moving from one to two
    machine registers, the type of the right shift is for the most
    significant word should be determined by the signedness of the inner
    type, not the signedness of the result type.
    
    gcc:
        PR rtl-optimization/79121
        * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
        of the inner type when shifting an extended value.
    
    gcc/testsuite:
        * gcc.c-torture/execute/pr79121.c: New test.

From-SVN: r244613
2017-01-19 10:35:38 +00:00
Jan Hubicka ea83dcf68d re PR lto/78407 (LTO breaks separate overriding of symbol aliases)
PR lto/78407
	* symtab.c (symtab_node::equal_address_to): Fix comparing of
	interposable aliases.

From-SVN: r244612
2017-01-19 10:00:56 +00:00
Peter Bergner f457ef94da re PR target/78516 (ICE in lra_assign for e500v2)
PR target/78516
	* config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
	Use the evmergelohi instruction.
	(mov_si<mode>_e500_subreg4_2_le): Likewise.
	(mov_sitf_e500_subreg8_2_be): Likewise.
	(mov_sitf_e500_subreg12_2_le): Likewise.
	(mov_si<mode>_e500_subreg0_2_le): Fix constraints.
	(mov_si<mode>_e500_subreg4_2_be): Likewise.
	(mov_sitf_e500_subreg8_2_le): Likewise.
	(mov_sitf_e500_subreg12_2_be): Likewise.

From-SVN: r244609
2017-01-18 20:23:35 -06:00
GCC Administrator 2ce7dea01d Daily bump.
From-SVN: r244608
2017-01-19 00:16:17 +00:00
Michael Meissner 54dc4be290 p9-xxbr-1.c: Fix typos in submission.
2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/p9-xxbr-1.c: Fix typos in submission.
	* gcc.target/powerpc/p9-xxbr-2.c: Likewise.

From-SVN: r244605
2017-01-19 00:12:14 +00:00
Bill Schmidt 20ca9ae25f altivec.md (altivec_vbpermq): Change "type" attribute from vecsimple to vecperm.
2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/altivec.md (altivec_vbpermq): Change "type"
	attribute from vecsimple to vecperm.
	(altivec_vbpermq2): Likewise.

From-SVN: r244603
2017-01-18 22:36:39 +00:00
Bill Schmidt 1c8bf56078 re PR target/79040 (vec_cntlz redefined)
2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/79040
	* config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.

From-SVN: r244602
2017-01-18 22:29:22 +00:00
Louis Krupp 7bd5dad249 re PR fortran/50069 (FORALL fails on a character array)
2017-01-18  Louis Krupp  <louis.krupp@zoho.com>

	PR fortran/50069
	PR fortran/55086
	* gfortran.dg/pr50069_1.f90: New test.
	* gfortran.dg/pr50069_2.f90: New test.
	* gfortran.dg/pr55086_1.f90: New test.
	* gfortran.dg/pr55086_1_tfat.f90: New test.
	* gfortran.dg/pr55086_2.f90: New test.
	* gfortran.dg/pr55086_2_tfat.f90: New test.
	* gfortran.dg/pr55086_aliasing_dummy_4_tfat.f90: New test.

2017-01-18  Louis Krupp  <louis.krupp@zoho.com>

	PR fortran/50069
	PR fortran/55086
	* trans-expr.c (gfc_conv_variable): Don't treat temporary variables
	as function arguments.
	* trans-stmt.c (forall_make_variable_temp,
	generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
	gfc_trans_forall_1): Don't adjust offset of forall temporary
	for array sections, make forall temporaries work for substring
	expressions, improve test coverage by adding -ftest-forall-temp
	option to request usage of temporary array in forall code.
	* lang.opt: Add -ftest-forall-temp option.
	* invoke.texi: Add -ftest-forall-temp option.

From-SVN: r244601
2017-01-18 21:41:48 +00:00
David Malcolm b37589b0c4 Implement LANG_HOOKS_TYPE_FOR_SIZE for jit
gcc/jit/ChangeLog:
	* dummy-frontend.c (jit_langhook_type_for_size): Implement, using
	lto's lto_type_for_size.

From-SVN: r244600
2017-01-18 21:09:32 +00:00
Jason Merrill 8b1346a80a PR c++/68666 - member variable template-id
* typeck.c (finish_class_member_access_expr): Handle variable
	template-id.
	* pt.c (lookup_and_finish_template_variable): No longer static.
	* cp-tree.h: Declare it.

From-SVN: r244599
2017-01-18 16:05:12 -05:00
Aaron Sawdey 0edd264dfc rs6000-protos.h (expand_strn_compare): Add arg.
2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
	* config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
	* config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
	strcmp. Fix bug where comparison didn't stop with zero byte. Fix
	case where N arg is SIZE_MAX.
	* config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
	(cmpstrsi): Add pattern.
2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
	* gcc.dg/strcmp-1.c: New test.
	* gcc.dg/strncmp-1.c: Add test for a bug that escaped.

From-SVN: r244598
2017-01-18 14:56:16 -06:00
David Malcolm 551914b748 jit.dg: fix issue with compilation of test-threads.c
DejaGnu's <dejagnu.h> provides decls of various inline functions,
of which the jit testsuite uses "pass", "fail" and "note".

The jit testcase test-threads.c jumps through some hoops to make
these functions threadsafe, using macros to rename the implementation
in dejagnu.h, giving them a "dejagnu_" prefix, then reimplementing
the names with wrappers that use a mutex.

The DejaGnu functions gained a "static" modifier in
ad36659ffa984a0541cfc2bd27f393e0d7d173a7, which appears to be in
DejaGnu 1.5.2 onwards.

Unfortunately, jit.dg/test-threads.c has forward decls of
"dejagnu_pass" etc, and these don't have "static", leading to conflicts
with later versions of DejaGnu for which "pass" etc have "static".

This patch fixes things by removing the forward decls of
"dejagnu_pass", moving the usage of them to a point at which dejagnu.h
has been included, which ought to work with both earlier and later
versions of DejaGnu.

Fixes compilation of test-threads.c in jit testsuite.

gcc/testsuite/ChangeLog:
	* jit.dg/test-threads.c (dejagnu_pass): Remove decl.
	(dejagnu_fail): Likewise.
	(dejagnu_note): Likewise.
	(pass): Provide forward decl, moving true decl to after #include
	of harness.h.
	(fail): Likewise.
	(note): Likewise.

From-SVN: r244597
2017-01-18 20:47:12 +00:00
Torvald Riegel f8a94453ad libitm: Disable TSX on processors on which it may be broken.
libitm/ChangeLog

	* config/x86/target.h (htm_available): Add check for some processors
	on which TSX is broken.

From-SVN: r244594
2017-01-18 20:22:02 +00:00