Commit Graph

141809 Commits

Author SHA1 Message Date
Arnaud Charlet 877a5a124a [multiple changes]
2015-10-26  Claire Dross  <dross@adacore.com>

	* sem_aux.ads (Number_Components): Can return 0 when called on
	an empty record.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

	* contracts.adb (Analyze_Subprogram_Body_Contract): Use
	Unique_Defining_Entity instead of Corresponding_Spec_Of.
	* einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
	Node41 respectively.
	(SPARK_Aux_Pragma): Update the assertion and node querry.
	(SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
	(SPARK_Pragma): Update the assertion and node query.
	(SPARK_Pragma_Inherited): Update the assertion and node query.
	(Set_SPARK_Aux_Pragma): Update the assertion and node setting.
	(Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
	(Set_SPARK_Pragma): Update the assertion and node setting.
	(Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
	(Write_Field32_Name): Remove the output for SPARK_Pragma.
	(Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
	(Write_Field40_Name): Add output for SPARK_Pragma.
	(Write_Field41_Name): Add output for SPARK_Aux_Pragma.
	* einfo.ads Rewrite the documentation on attributes
	SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
	SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
	* exp_ch4.adb (Create_Anonymous_Master): Use
	Unique_Defining_Entity instead of Corresponding_Spec_Of.
	* exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
	function as such.
	(Expand_N_Task_Body): Mark the task body as such.
	(Expand_N_Task_Type_Declaration): Mark the task body as such.
	* exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
	of Corresponding_Spec_Of.
	* sem_attr.adb (Analyze_Attribute_Old_Result): Use
	Unique_Defining_Entity instead of Corresponding_Spec_Of.
	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
	functions do not inherit the SPARK_Mode from the context.
	(Build_Subprogram_Declaration): The matching spec is now marked
	as a source construct to mimic the original stand alone body.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
	* sem_ch9.adb Add with and use clauses for Contracts.
	(Analyze_Entry_Body): An entry body freezes the contract of
	the nearest enclosing package body. The entry body now inherits
	the SPARK_Mode from the context.
	(Analyze_Entry_Declaration): A protected entry declaration now inherits
	the SPARK_Mode from the context.
	(Analyze_Protected_Body): A protected body freezes
	the contract of the nearest enclosing package body. Set the
	Etype of a protected body as this is neede for proper aspect
	analysis. Protected bodies can now carry meaningful aspects and
	those are now analyzed.
	(Analyze_Protected_Type_Declaration): A protected type now inherits the
	SPARK_Mode from the context.
	(Analyze_Task_Body): A task body freezes the contract of the
	nearest enclosing package body. Set the Etype of a task body
	as this is needed for proper aspect analysis. A task body
	now inherits the SPARK_Mode from the context.  Task bodies
	can now carry meaningful aspects and those are now analyzed.
	(Analyze_Task_Type_Declaration): A task type declaration now
	inherits the SPARK_Mode of from the context.
	* sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
	stubs can now carry meaningful aspects.
	(Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
	aspects.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
	Warnings now use routine Insert_Pragma as means of insertion into
	the tree.
	(Insert_After_SPARK_Mode): Clean up documentation.
	(Insert_Pragma): Clean up documentation. The routine is now
	capable of operating on synchronized units.
	* sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
	(Analyze_Contract_Cases_In_Decl_Part): Use
	Unique_Defining_Entity instead of Corresponding_Spec_Of.
	(Analyze_Depends_Global): Use Unique_Defining_Entity instead
	of Corresponding_Spec_Of.
	(Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
	Corresponding_Spec_Of.
	(Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
	Corresponding_Spec_Of.
	(Analyze_Pragma): Use Unique_Defining_Entity instead of
	Corresponding_Spec_Of.
	Update the detection of an illegal pragma Ghost when it applies
	to a task or protected unit. Reimplement the handling of
	pragma SPARK_Mode.
	(Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
	instead of Corresponding_Spec_Of.
	(Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
	Corresponding_Spec_Of.
	(Check_Library_Level_Entity): Update the comment on usage.
	Reimplemented to offer a more specialized errror context.
	(Check_Pragma_Conformance): Update profile and comment on usage.
	Handle error message output on single protected or task units.
	(Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
	instead of Corresponding_Spec_Of.
	(Process_Body): New routine.
	(Process_Overloadable): New routine.
	(Process_Private_Part): New routine.
	(Process_Statement_Part): New routine.
	(Process_Visible_Part): New routine.
	(Set_SPARK_Context): New routine.
	(Set_SPARK_Flags): Removed.
	* sem_util.adb (Corresponding_Spec_Of): Removed.
	(Unique_Entity): Reimplemented to handle many more cases.
	* sem_util.ads (Corresponding_Spec_Of): Removed.
	(Unique_Defining_Entity): Update the comment on usage.
	* sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
	(Is_Task_Body_Procedure): New routine.
	(Set_Is_Entry_Barrier_Function): Update the assertion.
	(Set_Is_Task_Body_Procedure): New routine.
	* sinfo.adb Update the documentation of attribute
	Is_Entry_Barrier_Function along with use in nodes. Add new
	attribute Is_Task_Body_Procedure along with use in nodes.
	(Is_Task_Body_Procedure): New routine along with pragma Inline.
	(Set_Is_Task_Body_Procedure): New routine along with pragma Inline.

From-SVN: r229328
2015-10-26 11:57:17 +01:00
Arnaud Charlet 078b1a5f6d [multiple changes]
2015-10-26  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch13.adb: Minor reformatting.

2015-10-26  Steve Baird  <baird@adacore.com>

	* exp_disp.adb: Omit most dispatch table initialization code
	if Generate_SCIL is true.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

	* sinfo.ads, exp_ch3.adb: Revert previous change.
	(Build_Record_Init_Proc): Do not build an aggregate if
	Modify_Tree_For_C.

From-SVN: r229327
2015-10-26 11:54:01 +01:00
Arnaud Charlet e4bda61026 [multiple changes]
2015-10-26  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
	body whose signature is type conformant with a previous expression
	function.

2015-10-26  Bob Duff  <duff@adacore.com>

	* treepr.adb: Code clean up.

From-SVN: r229326
2015-10-26 11:49:55 +01:00
Eric Botcazou dc9111cfce freeze.adb (Check_Component_Storage_Order): Skip a record component if it has Complex_Representation.
2015-10-26  Eric Botcazou  <ebotcazou@adacore.com>

	* freeze.adb (Check_Component_Storage_Order): Skip a record
	component if it has Complex_Representation.
	(Freeze_Record_Type): If the type has Complex_Representation, skip the
	regular treatment of Scalar_Storage_Order attribute and instead issue
	a warning if it is present.

From-SVN: r229325
2015-10-26 11:47:56 +01:00
Tom de Vries 930e85a354 Add make_restrict_var_constraints
2015-10-26  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (make_restrict_var_constraints): New function,
	factored out of ...
	(intra_create_variable_infos): ... here.

From-SVN: r229324
2015-10-26 10:47:09 +00:00
Tom de Vries 306fa91bda Add vars in intra_create_variables_info
2015-10-26  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (intra_create_variable_infos): Add
	restrict_pointer_p and recursive_restrict_p variables.

From-SVN: r229323
2015-10-26 10:47:00 +00:00
Tom de Vries e541e62f3b Inline get_vi_for_tree into intra_create_variable_infos
2015-10-26  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (intra_create_variable_infos): Inline
	get_vi_for_tree call.

From-SVN: r229322
2015-10-26 10:46:52 +00:00
Arnaud Charlet 77237288bd [multiple changes]
2015-10-26  Bob Duff  <duff@adacore.com>

	* sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
	aspect, make sure an implicitly declared interpretation is
	overridden by an explicit one.
	* sem_util.ads: Update comment.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
	bodies should "freeze" the contract of the nearest enclosing
	package body.

From-SVN: r229321
2015-10-26 11:45:50 +01:00
Arnaud Charlet 02886c2e8a 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
* adaint.c (__gnat_lwp_self): Replace current implementation re-using
	the Linux one, which uses an __NR_gettid syscall rather than
	pthread_self.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

	* sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
	Build_Record_Init_Proc): Do not inline init procs when
	Modify_Tree_For_C is True.

2015-10-26  Bob Duff  <duff@adacore.com>

	* errout.ads: Minor comment fix.
	* einfo.ads: Minor style fix.

2015-10-26  Bob Duff  <duff@adacore.com>

	* sem_ch3.adb (Derive_Interface_Subprogram): Fix
	Is_Abstract_Subprogram, which might have been calculated
	incorrectly, because we're passing Ultimate_Alias (Subp) (and
	its dispatching type) to Derive_Subprogram, instead of the true
	parent subprogram and type.

2015-10-26  Bob Duff  <duff@adacore.com>

	* sem_ch13.adb (Check_Iterator_Functions): When
	printing the "default iterator must be unique" error message,
	also print references to the places where the duplicates are
	declared. This makes the message clearer.

From-SVN: r229320
2015-10-26 11:39:41 +01:00
Christophe Lyon 51022ff731 Fix race on temp file in gfortran tests.
2015-10-26  Christophe Lyon  <christophe.lyon@linaro.org>

	* gfortran.dg/chmod_1.f90: Add suffix to the temporary filename to
	make it unique per testcase.
	* gfortran.dg/chmod_2.f90: Likewise.
	* gfortran.dg/chmod_3.f90: Likewise.
	* gfortran.dg/direct_io_8.f90: Likewise.
	* gfortran.dg/f2003_inquire_1.f03: Likewise.
	* gfortran.dg/f2003_io_1.f03: Likewise.
	* gfortran.dg/f2003_io_2.f03: Likewise.
	* gfortran.dg/f2003_io_8.f03: Likewise.
	* gfortran.dg/inquire_size.f90: Likewise.
	* gfortran.dg/namelist_66.f90: Likewise.
	* gfortran.dg/namelist_82.f90: Likewise.
	* gfortran.dg/namelist_87.f90: Likewise.
	* gfortran.dg/open_negative_unit_1.f90: Likewise.
	* gfortran.dg/open_new.f90: Likewise.
	* gfortran.dg/stat_1.f90: Likewise.
	* gfortran.dg/stat_2.f90: Likewise.
	* gfortran.dg/streamio_15.f90: Likewise.
	* gfortran.dg/unf_read_corrupted_1.f90: Likewise.

From-SVN: r229319
2015-10-26 11:37:22 +01:00
Arnaud Charlet a9fdbccb85 [multiple changes]
2015-10-26  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
	Box_Present when the formal part is (others => <>) even though
	it is equivalent to a formal part (<>), because ASIS tools depend
	on the syntactic setting of this flag.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb: Minor reformatting.
	* einfo.ads: Minor typo.

2015-10-26  Joel Brobecker  <brobecker@adacore.com brobecker>

	* adaint.c (__gnat_open_new_temp): Use mkstemp on Android.

From-SVN: r229318
2015-10-26 11:35:52 +01:00
Kyrylo Tkachov f8ac2f077a [optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap
PR middle-end/67989
	* optabs.c (expand_atomic_compare_and_swap): Handle case when
	ptarget_oval or ptarget_bool are const0_rtx.

	* g++.dg/pr67989.C: New test.

From-SVN: r229317
2015-10-26 10:28:12 +00:00
Ed Schonberg 8c14315a0d sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
2015-10-26  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
	* sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
	of Check_Indexing_Functions, to verify that a derived type with an
	Indexing aspect is not inheriting such an aspect from an ancestor.
	(Check_Indexing_Functions): Call Check_Inherited_Indexing within
	an instance.

From-SVN: r229316
2015-10-26 11:24:05 +01:00
Maxim Kuvyrkov 013a83cc02 Fix race on temp file in gfortran streamio_*.f90 tests
* gfortran.dg/streamio_4.f90, gfortran.dg/streamio_5.f90,
	* gfortran.dg/streamio_6.f90, gfortran.dg/streamio_7.f90,
	* gfortran.dg/streamio_10.f90, gfortran.dg/streamio_12.f90: Add
	suffix to the temporary filename to make it unique per testcase.

From-SVN: r229315
2015-10-26 10:22:15 +00:00
Arnaud Charlet e96b7045d6 [multiple changes]
2015-10-26  Gary Dismukes  <dismukes@adacore.com>
        
        * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
        typo corrections.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>
        
        * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
        recheck the consistency betwen the freeze point and the end of
        declarations for the expression in an aspect specification,
        because it was done already in the analysis of the generic.
        Furthermore, the delayed analysis of an aspect of the instance
        may produce spurious errors when the generic is a child unit
        that references entities in the parent (which might not be in
        scope at the freeze point of the instance).

2015-10-26  Yannick Moy  <moy@adacore.com>
        
        * sem_res.adb (Resolve_Call): Issue info message
        instead of warning when call cannot be inlined in GNATprove mode.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>
        
        * exp_ch6.adb (Build_Procedure_Form): Use _result as the
        name of the extra parameter, cleaner than a random temp name.
        * gnat1drv.adb (Gnat1drv): Code clean up.

From-SVN: r229314
2015-10-26 11:12:40 +01:00
Christian Bruel c1fffdf1fb function.h (MINIMUM_METHOD_BOUNDARY): New macro.
2015-10-26  Christian Bruel  <christian.bruel@st.com>

	* function.h (MINIMUM_METHOD_BOUNDARY): New macro.
	* cp/decl.c (grokfndecl): Set DECL_ALIGN with MINIMUM_METHOD_BOUNDARY.
	* cp/method.c (implicitly_declare_fn): Likewise.
	* cp/lambda.c (maybe_add_lambda_conv_op): Likewise. Remove VBIT setting.
	* java/class.c (add_method_1): Likewise.

From-SVN: r229313
2015-10-26 10:50:37 +01:00
Richard Biener 5929c65918 alloc-pool.h (base_pool_allocator): Use placement new.
2015-10-26  Richard Biener  <rguenther@suse.de>

	* alloc-pool.h (base_pool_allocator): Use placement new.
	(base_pool_allocator::remove): Likewise.  Compute size outside of
	flag_checking.

From-SVN: r229312
2015-10-26 09:48:32 +00:00
Richard Sandiford 543a9bcd21 Move int rounding folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
	* builtins.c (do_real_to_int_conversion): New function.
	(fold_fixed_mathfn, fold_builtin_int_roundingfn): Delete.
	(fold_builtin_1): Handle constant {i,l,ll}{ceil,floor,round}{f,,l}
	arguments here.
	* match.pd: Add rules previously handled by fold_fixed_mathfn
	and fold_builtin_int_roundingfn.

gcc/testsuite/
	* gcc.dg/torture/builtin-minmax-1.c: Don't run at -O0.

From-SVN: r229311
2015-10-26 09:29:26 +00:00
Richard Sandiford 257aecb4a5 Use macros to define built-in operator lists
No functional change.  This should be a slight readability improvement
on its own, but becomes more important with the next patch.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
	* match.pd: Use macros to define built-in operator lists.

From-SVN: r229310
2015-10-26 09:26:11 +00:00
Richard Sandiford 0eb72c5dd6 Fix scripto
From-SVN: r229309
2015-10-26 09:21:27 +00:00
Richard Sandiford 96285749d8 Move cexp simplifications to match.pd
This required reinstating support for captures in the result
of a simplification.  That part (genmatch.c) is by Richard B.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
2015-10-20  Richard Sandiford  <richard.sandiford@arm.com>
	    Richard Biener  <rguenther@suse.de>

	* genmatch.c (dt_simplify::gen): Skip captures that are
	part of the result.
	(parser::parse_expr): Allow captures in results too.
	* builtins.c (fold_builtin_cexp): Delete.
	(fold_builtin_1): Handle constant cexp arguments here.
	* match.pd: Fold cexp(x+yi) to exp(x) * cexpi(y).

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r229308
2015-10-26 09:18:30 +00:00
Mikhail Maltsev 9df01367f2 ENABLE_CHECKING refactoring: pool allocators
gcc/
	* alloc-pool.h (base_pool_allocator::initialize, ::allocate): Remove
	conditional compilation.
	(base_pool_allocator::remove): Use flag_checking.

From-SVN: r229307
2015-10-26 01:11:00 +00:00
GCC Administrator e51b667fe8 Daily bump.
From-SVN: r229306
2015-10-26 00:16:17 +00:00
Paul Thomas 6a4236ceb1 re PR fortran/67171 (sourced allocation)
2015-01-25  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67171
	* trans-array.c (structure_alloc_comps): On deallocation of
	class components, reset the vptr to the declared type vtable
	and reset the _len field of unlimited polymorphic components.
	*trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
	allocatable component references to the right of part reference
	with non-zero rank and return NULL.
	(gfc_reset_vptr): Simplify this function by using the function
	gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
	(gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
	NULL return.
	* trans-stmt.c (gfc_trans_allocate): Rely on the use of
	gfc_trans_assignment if expr3 is a variable expression since
	this deals correctly with array sections.

2015-01-25  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67171
	* gfortran.dg/allocate_with_source_12.f03: New test

	PR fortran/61819
	* gfortran.dg/allocate_with_source_13.f03: New test

	PR fortran/61830
	* gfortran.dg/allocate_with_source_14.f03: New test

From-SVN: r229303
2015-10-25 21:31:12 +00:00
John David Anglin 9621d52481 som.h (EH_FRAME_THROUGH_COLLECT2): Define.
* config/pa/som.h (EH_FRAME_THROUGH_COLLECT2): Define.

From-SVN: r229302
2015-10-25 18:34:00 +00:00
John David Anglin a89905fdd2 re PR middle-end/68079 (hppa: pointers to method types need canonicalization before comparison)
PR middle-end/68079
	* dojump.c (do_compare_and_jump): Canonicalize both function and
	method types.

From-SVN: r229299
2015-10-25 15:18:48 +00:00
John David Anglin fa788aea53 Wno-frame-address.C: Skip on hppa*-*-*.
* g++.dg/Wno-frame-address.C: Skip on hppa*-*-*.

From-SVN: r229298
2015-10-25 14:58:28 +00:00
Uros Bizjak 911633831f re PR target/68084 (Inverted conditions generated for x86 inline assembly "flag output constraints")
PR target/68084
	* config/i386/i386.c (ix86_md_asm_adjust) [case 'a']: Use NE code
	for =@ccae.

testsuite/ChangeLog:

	PR target/68084
	* gcc.target/i386/pr68084.c: New test.

From-SVN: r229296
2015-10-25 14:21:01 +01:00
Andre Vehreschild f2f5814e59 Added missing testcases of r229294 for patch of
PR fortran/66927.

From-SVN: r229295
2015-10-25 14:02:32 +01:00
Andre Vehreschild b8ac4f3b22 re PR fortran/66927 (ICE in gfc_conf_procedure_call)
gcc/fortran/ChangeLog:

2015-10-25  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/66927
	PR fortran/67044
	* trans-array.c (build_array_ref): Modified call to 
	gfc_get_class_array_ref to adhere to new interface.
	(gfc_conv_expr_descriptor): For one-based arrays that
	are filled by a loop starting at one the start index of the
	source array has to be mangled into the offset.
	* trans-expr.c (gfc_get_class_array_ref): When the tree to get
	the _data component is present already, add a way to supply it.
	(gfc_copy_class_to_class): Allow to copy to a derived type also.
	* trans-stmt.c (gfc_trans_allocate): Do not conv_expr_descriptor
	for functions returning	a class or derived object. Get the
	reference instead.
	* trans.h: Interface change of gfc_get_class_array_ref.

gcc/testsuite/ChangeLog:

2015-10-25  Andre Vehreschild  <vehre@gmx.de>

	PR fortran/66927
	PR fortran/67044
	* gfortran.dg/allocate_with_source_10.f08: New test.
	* gfortran.dg/allocate_with_source_11.f08: New test.
	* gfortran.dg/class_array_15.f03: Changed count of expected
	_builtin_frees to 11. One step of temporaries is spared, therefore
	the allocatable component of that temporary is not to be freeed.

From-SVN: r229294
2015-10-25 13:28:57 +01:00
GCC Administrator f63df13739 Daily bump.
From-SVN: r229293
2015-10-25 00:16:14 +00:00
Jonathan Wakely 93e954005f Implement C++17 std::invoke and LWG DR 2219
* include/std/functional (__invoke_impl): New overloads.
	(__invoke): Replace with a single function calling __invoke_impl.
	(invoke): Add C++17 std::invoke.
	(reference_wrapper::operator()): Qualify call to __invoke.
	(_Mem_fn_traits_base, _Mem_fn_traits): Remove unused typedefs.
	(_Mem_fn_base): Remove unused typedefs and implement call operator in
	terms of __invoke.
	* include/std/future (__future_base::_Async_state_commonV2): Do not
	pass reference_wrapper as object argument to call_once.
	* include/std/type_traits (result_of): Define nested __invoke_type.
	Handle reference_wrapper as per LWG 2219.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error directives.
	* testsuite/20_util/function_objects/mem_fn/55463.cc: Remove tests
	using member functions of reference_wrapper.

From-SVN: r229290
2015-10-25 01:00:54 +01:00
Jonathan Wakely 6fbd598400 Return deferred future if thread cannot be run
* include/std/future (async): Use deferred function on exception.
	* testsuite/30_threads/async/except.cc: New.

From-SVN: r229289
2015-10-24 22:36:50 +01:00
Steven G. Kargl 4381322d6e re PR fortran/68055 (ICE on using unsupported kinds in program without program statement)
2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68055
	* decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
	declarations.

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68055
	* gfortran.dg/pr68055.f90: New case.

From-SVN: r229288
2015-10-24 17:09:35 +00:00
Steven G. Kargl 8d48826b99 re PR fortran/67805 (ICE on array constructor with wrong character specification)
2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/67805
	* array.c (gfc_match_array_constructor): Check for error from type
	spec matching.
	* decl.c (char_len_param_value): Check for valid of charlen parameter.
	Reap dead code dating to 2008.
	match.c (gfc_match_type_spec): Special case the keyword use in REAL.

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/67805
	* gfortran.dg/pr67805.f90: New testcase.
	* gfortran.dg/array_constructor_26.f03: Update testcase.
	* gfortran.dg/array_constructor_27.f03: Ditto.
	* gfortran.dg/char_type_len_2.f90: Ditto.
	* gfortran.dg/pr67802.f90: Ditto.
	* gfortran.dg/used_before_typed_3.f90: Ditto.

From-SVN: r229287
2015-10-24 16:20:26 +00:00
Eric Botcazou ae1158c425 utils2.c (build_binary_op): Tweak formatting.
* gcc-interface/utils2.c (build_binary_op): Tweak formatting.
	(build_unary_op): Likewise.

From-SVN: r229284
2015-10-24 09:06:26 +00:00
Jason Merrill e7838ec9d2 DR 1518 DR 1630 PR c++/54835 PR c++/60417
DR 1518
	DR 1630
	PR c++/54835
	PR c++/60417
	* call.c (convert_like_real): Value-initialization can't use
	explicit constructors in C++11 and up.

From-SVN: r229283
2015-10-23 22:58:10 -04:00
GCC Administrator a8c6dabc47 Daily bump.
From-SVN: r229282
2015-10-24 00:16:12 +00:00
Jan Hubicka d36475161d PR ipa/pr67600
PR ipa/pr67600
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::get_dynamic_type): Do not confuse
	instance offset with offset of outer type.
	* g++.dg/torture/pr67600.C: New testcase.

From-SVN: r229279
2015-10-23 23:33:58 +00:00
Jan Hubicka 3c7a8ece3e * fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR.
From-SVN: r229278
2015-10-23 23:30:31 +00:00
Caroline Tice 9145a53941 This patch fixes a compile-time regression that was originally introduced by the fix for PR64111, in GCC 4.9.3.
This patch fixes a compile-time regression that was originally
introduced by the fix for PR64111, in GCC 4.9.3.
gcc/ChangeLog:

2015-10-23  Caroline Tice  <cmtice@google.com>

        (from Richard Biener)
        * tree.c (int_cst_hasher::hash):  Replace XOR with more efficient
        call to iterative_hash_host_wide_int.

From-SVN: r229277
2015-10-23 16:22:42 -07:00
David Edelsohn b9584cb56b config.gcc (powerpc-ibm-aix[6789]): Define as yes.
* config.gcc (powerpc-ibm-aix[6789]) [default_use_cxa_atexit]:
        Define as yes.

From-SVN: r229276
2015-10-23 18:56:08 -04:00
Ilya Enkovich bfccadc924 tree-vect-generic.c (expand_vector_operations_1): Check optab exists before use it.
gcc/

	* tree-vect-generic.c (expand_vector_operations_1): Check
	optab exists before use it.

gcc/testsuite/

	* g++.dg/pr68062.C: New test.

From-SVN: r229275
2015-10-23 22:41:40 +00:00
Ilya Enkovich 486208e77a tree-vect-generic.c (expand_vector_condition): Avoid uninitialized variable warning.
gcc/

	* tree-vect-generic.c (expand_vector_condition): Avoid
	uninitialized variable warning.

From-SVN: r229274
2015-10-23 22:38:37 +00:00
Mikhail Maltsev c86db055fb [PATCH 4/9] ENABLE_CHECKING refactoring: Fortran
2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>

	* trans-common.c (create_common): Adjust to use flag_checking.
	* trans.c (gfc_add_modify_loc): Use gcc_checking_assert.

From-SVN: r229273
2015-10-23 16:36:12 -06:00
Jeff Law 9447d255f4 [PATCH] Call flush_ssaname_freelist more often
[PATCH] Call flush_ssaname_freelist more often
       * passes.c (execute_function_todo): Do not call flush_ssaname_freelist
        here.  Instead...
        (execute_todo): Call it here.
        * tree-ssanames.c (make_ssa_name_fn): Unconditionally gather reuse
        statistics
        (pass_release_ssa_names::execute): Do not call flusH_ssaname_freelist.

From-SVN: r229272
2015-10-23 16:34:04 -06:00
Jason Merrill 73a842690d re PR c++/67813 ([C++14] copy-initialization of object with pointer member fails in constexpr function)
PR c++/67813
	* constexpr.c (cxx_eval_store_expression): Always use *valp if
	set.

From-SVN: r229270
2015-10-23 16:57:05 -04:00
Gregor Richards 0d6be0b103 [rs6000] Enable secureplt by default on musl
* config.gcc (enable_secureplt): Add *-linux*-musl*.


Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>

From-SVN: r229268
2015-10-23 19:44:24 +00:00
Jeff Law 0a8c1e2390 [RFA] Fix pr67830, another type narrowing problem
PR tree-optimization/67830
	* match.pd ((bit_and (plus/minus (convert @0) (convert @1)) mask)):
	Explicitly verify the mask has no bits outside the type of
	the innermost operands.

	PR tree-optimization/67830
	* gcc.dg/pr67830.c: New test.

From-SVN: r229267
2015-10-23 13:16:53 -06:00
Gregor Richards 7e8efecbaf powerpc musl libc support
gcc/
	* config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
	(MUSL_DYNAMIC_LINKER64): Define.
	(GNU_USER_DYNAMIC_LINKER32): Update.
	(GNU_USER_DYNAMIC_LINKER64): Update.
	(CHOOSE_DYNAMIC_LINKER): Update.

	* config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update.
	(MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,)
	(INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
	(INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
	(INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
	(CHOOSE_DYNAMIC_LINKER): Update.
	(INCLUDE_DEFAULTS): Redefine.

	* config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define.


Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>

From-SVN: r229266
2015-10-23 19:07:05 +00:00