Commit Graph

141555 Commits

Author SHA1 Message Date
Arnaud Charlet 5f0a92e5c4 Fix typos.
From-SVN: r229054
2015-10-20 13:59:47 +02:00
Arnaud Charlet 319c61611e [multiple changes]
2015-10-20  Yannick Moy  <moy@adacore.com>

	* sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
	fully default initialized.
	* sem_ch6.adb: minor style fix in comment

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
	quantities, to produce a string that includes the dimension
	synbol for the quantity, or the vector of dimensions in standard
	notation.
	* sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
	Image, to include dimension information in the generated string,
	identical to the string produced by the Put procedure on a string
	for a dimensioned quantity.

From-SVN: r229053
2015-10-20 13:59:22 +02:00
Arnaud Charlet d29f68cf55 [multiple changes]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Process_Declarations): A loop
	parameter does not require finalization actions.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
	actual subtype for a mutable record return type if the expression
	is itself a function call.

2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>

	* s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
	related to new type support.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
	to propagate dimension information from prefix.
	* sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
	* inline.ads: minor whitespace fix in comment
	* sem_ch6.adb: minor gramar fix in comment

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

	* sem_ch3.adb (Analyze_Object_Contract):
	A protected type or a protected object is allowed to have a
	discriminated part.

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

	* sem_util.adb (Requires_Transient_Scope):
	Return true for mutable records if the maximum size is very large.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
	the same signature as in System.IO.Put.

From-SVN: r229052
2015-10-20 13:49:17 +02:00
Arnaud Charlet b54d1d39d3 [multiple changes]
2015-10-20  Bob Duff  <duff@adacore.com>

	* a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
	and then" on the check.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
	a misplaced "constant" keyword in a discriminant specification.

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

	* einfo.ads (Is_Param_Block_Component_Type): New function decl
	for querying the flag.
	(Set_Is_Param_Block_Component_Type): New procedure decl for setting
	the flag.
	* einfo.adb (Is_Param_Block_Component_Type): New function body.
	(Set_Is_Param_Block_Component_Type): New procedure body.
	(Write_Entity_Flags): Display the new flag.
	* exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
	block component types.
	(Expand_N_Entry_Declaration): Set flag on parameter block component
	types.

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

	* sem_elab.adb: Do not pass an N_Attribute_Reference node to
	Sinfo.Set_No_Elaboration_Check.
	* sem_elab.adb (Check_Elab_Call) Do not pass a non-call
	node (specifically, an N_Attribute_Reference node) to
	Sinfo.Set_No_Elaboration_Check.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

	* adaint.c: File names are case sensitive on aarch64-ios.

From-SVN: r229051
2015-10-20 13:45:37 +02:00
Arnaud Charlet 1f8f3e6e07 [multiple changes]
2015-10-20  Bob Duff  <duff@adacore.com>

	* a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
	* a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
	* a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
	* a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.

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

	* exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
	require finalization actions.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* par-ch3.adb (P_Declarative_Items): In case of misplaced
	aspect specifications, ensure that flag Done is properly set to
	continue parse.

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

	* rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
	and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
	* sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
	the comment on usage. Use routine Is_Suspension_Object to detect
	whether a type matches Suspension_Object.
	(Is_Suspension_Object): New routine.
	* snames.ads-tmpl: Add predefined names for Suspension_Object
	and Synchronous_Task_Control.

From-SVN: r229049
2015-10-20 12:56:25 +02:00
Arnaud Charlet cbc61965f5 [multiple changes]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_smem.adb (Check_Shared_Var): Clean up code that handles
	type declarations with discriminants, remove obsolete check.

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

	* par_sco.adb: Minor style fixes.

2015-10-20  Vincent Celier  <celier@adacore.com>

	* debug.adb: Update documentation of -gnatdu.

From-SVN: r229048
2015-10-20 12:53:39 +02:00
Hristian Kirtchev 847d950d3a 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb Add aspect Volatile_Function to table
	Canonical_Aspect.
	* aspect.ads Add aspect Volatile_Function to tables
	Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
	and Implementation_Defined_Aspect.  Aspects Async_Readers,
	Async_Writers, Effective_Reads and Effective_Writes are no
	longer Boolean.
	* einfo.adb (Get_Pragma): Add an entry for pragma
	Volatile_Function.
	* par-prag.adb (Prag): Pragma Volatile_Function does not need
	special processing by the parser.
	* rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
	table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
	* sem_ch3.adb Fix SPARK RM references.
	(Analyze_Object_Contract): Update the error guard.
	* sem_ch5.adb Fix SPARK RM references.
	* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
	that a non-volatile function does not contain an effectively
	volatile parameter.
	(Analyze_Subprogram_Contract): Ensure
	that a non-volatile function does not contain an effectively
	volatile parameter.
	* sem_ch12.adb (Instantiate_Object): Remove the reference to
	the SPARK RM from the error message.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Add
	processing for aspects Async_Readers, Async_Writers,
	Effective_Reads, Effective_Writes and Volatile_Function.
	(Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
	Async_Writers, Effective_Reads, Effective_Writes and
	Volatile_Function do not need special processing at the freeze
	point.
	* sem_prag.adb Add an entry for pragma Volatile_Function in
	table Sig_Flags.
	(Analyze_External_Property_In_Decl_Part):
	Reimplemented as Async_Readers, Async_Writers, Effective_Reads
	and Effective_Writes are no longer Boolean pragmas.
	(Analyze_Global_Item): An external state or effectively
	volatile object cannot appear as an item in pragma
	[Refined_]Global.
	(Analyze_Pragma): Change the implementation
	of Async_Readers, Async_Writers, Effective_Reads and
	Effective_Writes as these are no longer Boolean pragmas.
	Use routine Check_Static_Boolean_Expression to verify the
	optional Boolean expression of Async_Readers, Async_Writers,
	Constant_After_Elaboration, Effective_Reads, Effective_Writes,
	Extensions_Visible and Volatile_Function.  Add processing for
	pragma Volatile_Function.
	(Check_Static_Boolean_Expression): New routine.
	(Find_Related_Context): Update the comment on usage.
	(Is_Enabled_Pragma): New routine.
	* sem_prag.ads (Is_Enabled_Pragma): New routine.
	* sem_res.adb Fix SPARK RM references.
	(Is_OK_Volatile_Context): Add detection for return statements.
	(Resolve_Actuals): Remove the check concerning an effectively volatile
	OUT actual parameter as this is now done by the SPARK flow analyzer.
	(Resolve_Entity_Name): Remove the check concerning an effectively
	volatile OUT formal parameter as this is now done by the SPARK
	flow analyzer.	(Within_Volatile_Function): New routine.
	* sem_util.adb (Add_Contract_Item): Add processing for pragma
	Volatile_Function.
	(Check_Nonvolatile_Function_Profile): New routine.
	(Is_Descendant_Of_Suspension_Object): New routine.
	(Is_Effectively_Volatile): Protected types and descendants of
	Suspension_Object are now treated as effectively volatile.
	(Is_Enabled): The optional Boolean expression of pragmas
	Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
	now appears as the first argument.
	(Is_Volatile_Function): New routine.
	* sem_util.ads Add SPARK RM references.
	(Add_Contract_Item): Update the comment on usage.
	(Check_Nonvolatile_Function_Profile): New routine.
	(Is_Effectively_Volatile): Update the comment on usage.
	(Is_Volatile_Function): New routine.
	* snames.ads-tmpl Add a predefined name and pragma id for
	Volatile_Function.

From-SVN: r229047
2015-10-20 12:43:21 +02:00
Arnaud Charlet e42d2186bd gnat_ugn.texi, [...]: Regenerate.
* gnat_ugn.texi, gnat_rm.texi: Regenerate.
	* doc/gnat_ugn/gnat_project_manager.rst,
	doc/gnat_ugn/building_executable_programs_with_gnat.rst,
	doc/gnat_ugn/the_gnat_compilation_model.rst,
	doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
	doc/gnat_rm/implementation_defined_pragmas.rst,
	doc/gnat_rm/the_gnat_library.rst,
	doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.

From-SVN: r229046
2015-10-20 12:41:38 +02:00
Ramana Radhakrishnan 2ee31fbf05 Enable VTV for aarch64 and arm
Requires fix for section anchors with VTV i.e. PR other/67868

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* configure.tgt (aarch64*-*-linux): Enable.
	(arm*-*-linux*): Enable.

From-SVN: r229045
2015-10-20 10:39:30 +00:00
Ramana Radhakrishnan 805f52d386 Fix VTV for targets with section anchors.
2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR other/67868
	* varasm.c (assemble_variable): Move special vtv handling to..
	(handle_vtv_comdat_sections): .. here. New function.
	(output_object_block): Handle vtv sections.

From-SVN: r229044
2015-10-20 10:36:54 +00:00
Ramana Radhakrishnan 75d363a042 Fix VTV for targets with section anchors.
2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR other/67868
	* varasm.c (assemble_variable): Move special vtv handling to..
	(handle_vtv_comdat_sections): .. here. New function.
	(output_object_block): Handle vtv sections.

From-SVN: r229043
2015-10-20 10:36:33 +00:00
Arnaud Charlet 04b32ed744 Update targets.
From-SVN: r229042
2015-10-20 12:36:00 +02:00
Bob Duff 14f732114e sem_ch13.adb (Analyze_One_Aspect): Avoid analyzing the expression in a 'Disable_Controlled attribute when...
2015-10-20  Bob Duff  <duff@adacore.com>

	* sem_ch13.adb (Analyze_One_Aspect): Avoid
	analyzing the expression in a 'Disable_Controlled attribute when
	Expander_Active is False, because otherwise, we get errors about
	nonstatic expressions in pragma-Preelaborate generic packages.
	* restrict.ads: minor whitespace cleanup in comment

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

	* a-conhel.adb: Remove "use SAC;", because otherwise the compiler
	complains about use clauses in run-time units. Use "use type"
	instead.
	* a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
	* a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
	* a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
	* a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
	* a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
	* a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
	* a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
	* a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
	* a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
	* a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
	* a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
	* a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
	* a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
	* a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
	* a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
	* a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
	* a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
	to share the tampering machinery in Ada.Containers.Helpers. This
	reduces the amount of duplicated code, and takes advantage of
	efficiency improvements in Helpers.
	Protect all run-time checks and supporting machinery with "if
	Checks" or "if T_Check", so this code can be suppressed with
	pragma Suppress or -gnatp.
	Add Pseudo_Reference and Get_Element_Access to remaining
	containers, so that the compiler can optimize "for ... of" loops.

From-SVN: r229041
2015-10-20 12:23:46 +02:00
Arnaud Charlet b7737d1d37 [multiple changes]
2015-10-20  Bob Duff  <duff@adacore.com>

	* a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
	Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
	new package Ada.Containers.Helpers, because otherwise it's not
	visible everywhere it needs to be (e.g. in the package
	Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
	a component of type Tamper_Counts).

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_type.adb (Intersect_Types): Specialize error message when
	one operand is a limited view which is a priori incompatible
	with all other named types.
	* sem_prag.adb: minor fix in comment
	* sem_ch13.adb: Code clean up.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
	for a subprogram nested in an inlined subprogram.

From-SVN: r229040
2015-10-20 12:20:37 +02:00
Arnaud Charlet 6fa8f71cf8 [multiple changes]
2015-10-20  Bob Duff  <duff@adacore.com>

	* a-coinve.adb, a-contai.adb: Update comments.
	* pprint.ads: Minor reformatting.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

	* env.c, init.c: Handle arm64-darwin like arm-darwin.
	* tracebak.c: Handle arm64-darwin.

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

	* s-trasym.adb (Symbolic_Traceback): When giving the traceback
	as hexadecimal code addresses, separate by blanks instead of LF.

From-SVN: r229039
2015-10-20 12:13:47 +02:00
Arnaud Charlet 36f2e3d311 [multiple changes]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
	node for subprogram in Compile_Only mode.

2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>

	* s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
	s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
	iterations.

From-SVN: r229037
2015-10-20 12:10:20 +02:00
Arnaud Charlet be7e4a402a [multiple changes]
2015-10-20  Philippe Gil  <gil@adacore.com>

	* g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
	contributors.
	(Dump_Stdout): NEW print to stdout Debug_Pool statistics &
	main contributors.
	(Reset): NEW reset counters to 0.
	(Get_Size): NEW return size allocated at parameter.
	(High_Water_Mark): NEW.
	(Current_Water_Mark): NEW.
	(System_Memory_Debug_Pool): NEW tell Debug_Pools that
	System.Memory uses it.
	* g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
	components.
	(Find_Or_Create_Traceback): don't manage in System.Memory
	Debug_Pool Deallocate Traceback's.
	(Validity): add optional Handled table when System.Memory asked
	for Allow_Unhandled_Memory.
	(Allocate): handle Allocate reentrancy occuring when System.Memory
	uses Debug_Pools.
	(Deallocate): handle when Allow_Unhandled_Memory
	is set deallocation of unhandled memory. Dont't check
	Size_In_Storage_Elements if equal to Storage_Count'Last. update
	Frees, Total_Frees new components.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* fe.h: Minor tweak.

From-SVN: r229036
2015-10-20 12:07:09 +02:00
Arnaud Charlet 46ee0270b7 [multiple changes]
2015-10-20  Vincent Celier  <celier@adacore.com>

	* sem_cat.adb (Check_Categorization_Dependencies): Do nothing
	when -gnatdu is specified.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
	formal abstract subprogram must have a controlling type.
	* stand.ads: Minor whitespace cleanup.

From-SVN: r229035
2015-10-20 12:04:44 +02:00
Arnaud Charlet 47b79f7801 [multiple changes]
2015-10-20  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch13.adb: Minor reference change (RM => AARM).

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* make.adb (Check): Skip multilib switches reinstated by the
	compiler only when counting the number of switches, since it is
	what really matters in the regular operating mode.

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

	* einfo.adb: Add extra assertion for small clause.
	* cstand.adb: Minor style fix in comment.
	* debug.adb: Minor reformatting.
	* exp_util.adb: Fix minor typo.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Same_Instantiated_Function): New predicate in
	Check_Formal_Package_Instance, used to verify that the formal
	and the actual of an actual package match when both are functions
	given as attribute references.

From-SVN: r229034
2015-10-20 12:00:15 +02:00
Arnaud Charlet e9f97e7931 [multiple changes]
2015-10-20  Bob Duff  <duff@adacore.com>

	* a-coinve.ads, a-coinve.adb: Do the same efficiency
	improvements that were already done in the definite case
	(Ada.Containers.Vectors, i.e. a-convec). This includes the
	ability to suppress checks, the fast path for Append, inlining
	as appropriate, and special-casing of "for ... of" loops. Reuse
	the tampering machinery that is now in Ada.Containers. Simplify
	many operations.
	* a-convec.ads, a-convec.adb: Change the code to be more similar
	to a-coinve.
	* a-finali.ads, a-finali.adb: Expose the "null"-ness of the
	operations. This may enable optimizations in the future, and
	seems cleaner anyway.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Is_Operational_Item): Attributes related to
	Ada 2012 iterators are operational items, and can be specified
	on partial views.

From-SVN: r229033
2015-10-20 11:56:56 +02:00
Arnaud Charlet 0489576ce8 [multiple changes]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
	(Usage_Error): Remove formal parameter Item. Emit a clearer message
	concerning a missing dependency item and place it on the related pragma.

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

	* debug.adb, expander.adb: Implement -gnatd.B switch, which
	triggers a bug box when an abort_statement is seen. This is
	useful for testing Comperr.Compiler_Abort.
	* gnat1drv.adb: Trigger bug box on all exceptions other than
	Unrecoverable_Error.

From-SVN: r229032
2015-10-20 11:55:20 +02:00
Arnaud Charlet 3c777b50a7 [multiple changes]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

	* Makefile.rtl: add the following...
	* g-binenv.ads, g-binenv.adb: New unit providing runtime access
	to bind time captured values ("bind environment")
	* init.c: declare new global variable __gl_bind_env_addr.
	* bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
	environment key=value pair.
	(Gen_Bind_Env_String): helper to produce the bind environment data
	called  in the binder generated file.
	(Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
	__gl_bind_env_addr accordingly.
	* switch-b.adb: Support for command line switch -V (user interface
	to set a build environment key=value pair)
	* bindusg.adb: Document the above

2015-10-20  Vincent Celier  <celier@adacore.com>

	* sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
	entity as Pure if Debug_Flag_U is set.

From-SVN: r229031
2015-10-20 11:53:11 +02:00
Arnaud Charlet 7188885e56 [multiple changes]
2015-10-20  Bob Duff  <duff@adacore.com>

	* output.adb (Write_Int): Work with negative numbers in order to avoid
	negating Int'First and thereby causing overflow.
	* sem_util.adb: Minor comment fix.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* make.adb (Check): Skip multilib switches reinstated by the
	compiler when doing the comparison with switches passed to
	gnatmake.

2015-10-20  Yannick Moy  <moy@adacore.com>

	* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
	False for procedures marked No_Return.
	* sem_util.ads (Enclosing_Declaration): Improve comment.
	* einfo.adb (Is_Completely_Hidden): Remove spurious assertion.

From-SVN: r229029
2015-10-20 11:48:00 +02:00
Arnaud Charlet f06f5f6bd6 [multiple changes]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

	* types.ads: Minor reformatting.

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

	* einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
	Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
	classification pragmas.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Analyze_Declarations); At the of the visible part,
	perform name resolution on the expressions in aspects of visible
	entities.
	* sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
	expressions in aspects independently of whether corresponding
	entity is frozen. Used to complete name resolution of aspect
	expressions for entities declared in the visible part of a
	package or generic package declaration.

From-SVN: r229028
2015-10-20 11:45:29 +02:00
Arnaud Charlet 40417de8ab [multiple changes]
2015-10-20  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: Add package Codepeer and its attributes.

2015-10-20  Thomas Quinot  <quinot@adacore.com>

	* sem_ch3.adb, sem_ch13.adb: Minor reformatting.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

	* gnatlink.adb (Gnatlink): Do not translate --RTS switch
	for the linker and instead pass the switches that were
	reinstated by the compiler.

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

	* a-contai.ads, a-convec.ads: Move Count_Type_Last from
	a-convec.ads to a-contai.ads, so other containers can refer to it.

From-SVN: r229027
2015-10-20 11:42:53 +02:00
Ed Schonberg b8a1821614 sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within Analyze_Full_Type_ Declaration...
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
	Analyze_Full_Type_ Declaration, used to apply legality rules in
	13,1,1 (18.3.3) concerning aspects that cannot be overridden in
	a type extension.
	(Check_Duplicate_Aspects): It is not legal to specify the
	Implicit_Dereference aspect on a full view if partial view has
	known discriminants.
	* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
	the specification of the aspect on a derived type confirms the
	value of the inherited one.
	* sem_util.adb (Reference_Discriminant): Return empty if none
	specified.

From-SVN: r229026
2015-10-20 11:40:24 +02:00
Arnaud Charlet d9147bb633 [multiple changes]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

	* exp_ch5.adb, sem_ch3.adb: Minor reformatting.

2015-10-20  Vincent Celier  <celier@adacore.com>

	* a-strsup.adb (Super_Trim): Remove statements that put NUL
	characters in unused portion of the Data string.

From-SVN: r229025
2015-10-20 11:38:17 +02:00
Szabolcs Nagy 16b340c224 Fix default_binds_local_p_2 for extern protected data
gcc:

	PR target/66912
	* varasm.c (default_binds_local_p_2): Turn on extern_protected_data.

gcc/testsuite:

	PR target/66912
	* gcc.target/aarch64/pr66912.c: New.
	* gcc.target/arm/pr66912.c: New.

From-SVN: r229024
2015-10-20 09:37:27 +00:00
Jason Merrill 0d8ab59ce0 re PR c++/67064 (Register asm variable broken)
PR c++/67064

	* semantics.c (force_paren_expr): Don't mess with hard register vars.

From-SVN: r229021
2015-10-20 02:49:13 -04:00
Arkadiusz Drabczyk 620cf5ea84 [PATCH] c/67925 - update documentation on `inline'
* doc/extend.texi: Update documentation WRT inline functions.

From-SVN: r229020
2015-10-19 23:52:00 -06:00
Jason Merrill 2a9fb7125e Implement N4268, Do constant evaluation of all non-type template args.
gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Define
	__cpp_nontype_template_args.
gcc/cp/
	* parser.c (cp_parser_template_argument): For C++1z just parse a
	constant-expression.
	* pt.c (convert_nontype_argument): For C++1z always call
	maybe_constant_value.

From-SVN: r229019
2015-10-19 22:48:51 -04:00
Jason Merrill dcdbc004d5 Expand PTRMEM_CST only when necessary.
* constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
	only when necessary.
	(cxx_eval_component_reference): Like here.
	* decl2.c (lower_var_init): And here.
	(c_parse_final_cleanups): Call it.
	* typeck2.c (digest_init_r): Not here.
	* decl.c (complete_vars): Or here.
	(cp_finish_decl): Add local statics to symbol table.

From-SVN: r229018
2015-10-19 22:48:43 -04:00
Jason Merrill 13b380a325 c-cppbuiltin.c (c_cpp_builtins): Define __cpp_enumerator_attributes...
* c-cppbuiltin.c (c_cpp_builtins): Define
	__cpp_enumerator_attributes, __cpp_fold_expressions,
	__cpp_unicode_characters.

From-SVN: r229017
2015-10-19 22:48:36 -04:00
Jason Merrill a36b732a76 typo
From-SVN: r229016
2015-10-19 22:48:25 -04:00
Steven G. Kargl b6969536a0 resolve.c (gfc_verify_binding_labels): Check for NULL pointer.
2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	* resolve.c (gfc_verify_binding_labels): Check for NULL pointer.

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

	* gfortran.dg/pr67900.f90: New tests.

From-SVN: r229013
2015-10-20 00:31:48 +00:00
GCC Administrator f7ddf3f349 Daily bump.
From-SVN: r229012
2015-10-20 00:16:15 +00:00
Alan Modra b2e4c071d7 PR66870 PowerPC64 Enable gold linker with split stack
A powerpc-linux/powerpc64-linux biarch compiler can default to either
-m32 or -m64, and we need to notice both -m32 and -m64 on the gccgo
command line.  It's also possible to build a -m64 only compiler, so in
that case we can define TARGET_CAN_SPLIT_STACK.

gcc/
	PR go/66870
	* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
	* config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
	(TARGET_CAN_SPLIT_STACK_64BIT): Define.
gcc/go/
	PR go/66870
	* gospec.c (saw_opt_m32): Rename to..
	(is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
	Update uses.
	(lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.

From-SVN: r229009
2015-10-20 10:20:30 +10:30
Pierre-Marie de Rodat 524d9b4b90 REE: fix uninitialized registers handling
gcc/ChangeLog:

	PR rtl-optimization/66790
	* df.h (DF_MIR): New macro.
	(DF_LAST_PROBLEM_PLUS1): Update to be past DF_MIR
	(DF_MIR_INFO_BB): New macro.
	(DF_MIR_IN, DF_MIR_OUT): New macros.
	(struct df_mir_bb_info): New.
	(df_mir): New macro.
	(df_mir_add_problem, df_mir_simulate_one_insn): New forward
	declarations.
	(df_mir_get_bb_info): New.
	* df-problems.c (struct df_mir_problem_data): New.
	(df_mir_free_bb_info, df_mir_alloc, df_mir_reset,
	df_mir_bb_local_compute, df_mir_local_compute, df_mir_init,
	df_mir_confluence_0, df_mir_confluence_n,
	df_mir_transfer_function, df_mir_free, df_mir_top_dump,
	df_mir_bottom_dump, df_mir_verify_solution_start,
	df_mir_verify_solution_end): New.
	(problem_MIR): New.
	(df_mir_add_problem, df_mir_simulate_one_insn): New.
	* timevar.def (TV_DF_MIR): New.
	* ree.c: Include bitmap.h
	(add_removable_extension): Add an INIT_REGS parameter.  Use it
	to skip zero-extensions that may get an uninitialized register.
	(find_removable_extensions): Compute must-initialized registers
	using the MIR dataflow problem. Update the call to
	add_removable_extension.
	(find_and_remove_re): Call df_mir_add_problem.

gcc/testsuite/ChangeLog:

	* gnat.dg/opt50.adb: New test.
	* gnat.dg/opt50_pkg.adb: New helper.
	* gnat.dg/opt50_pkg.ads: New helper.

From-SVN: r229008
2015-10-19 23:47:35 +00:00
Segher Boessenkool 32308c8db4 mn10300: Use the STC bb-reorder algorithm at -Os
For mn10300, STC still gives better results for optimise-for-size than
"simple" does.  So use STC at -Os as well.


2015-10-19  Segher Boessenkool  <segher@kernel.crashing.org>

	* common/config/mn10300/mn10300-common.c
	(mn10300_option_optimization_table) <OPT_freorder_blocks_algorithm_>:
	Use REORDER_BLOCKS_ALGORITHM_STC at -Os and up.

From-SVN: r229006
2015-10-20 00:03:13 +02:00
David Wohlferd 88f3c6e6c1 Proposed doc update for Explicit Reg Vars 1/3
Proposed doc update for Explicit Reg Vars 1/3
        * doc/extend.texi (Explicit Register Variables): Simplify and
        avoid unnecessary and confusion abbreviations.  Update cross
        references.
        doc/implement-c.tex: Update cross reference.

From-SVN: r229004
2015-10-19 15:15:41 -06:00
Steven G. Kargl c3fa5d78ba re PR fortran/68019 (ICE on rank mismatch of implied-shape array of user-defined type)
2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68019
	* decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
	message to be issued.

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

	PR fortran/68019
	* gfortran.dg/pr68019.f90: new test.

From-SVN: r229003
2015-10-19 21:09:21 +00:00
Jeff Law a2f6018f32 [PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch
* tree-ssa-threadupdate.c (valid_jump_thread_path): Reject paths
	that create irreducible loops unless the path elimiantes a multiway
	branch.

From-SVN: r228974
2015-10-19 10:24:00 -06:00
Richard Biener e6503e0a45 re PR tree-optimization/67975 (Failure to optimise equality between two call sequences)
2015-10-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67975
	* tree-cfg.h (extract_true_false_controlled_edges): Declare.
	* tree-cfg.c (extract_true_false_controlled_edges): Split out
	core worker from ...
	* tree-ssa-loop-im.c (extract_true_false_args_from_phi): ... here.
	* tree-ssa-sccvn.c (vn_phi_compute_hash): Hash number of args
	instead of block number for PHIs with two or one args.
	(vn_phi_eq): Compare edge predicates of PHIs that are in different
	blocks.

	* gcc.dg/tree-ssa/ssa-fre-50.c: New testcase.

From-SVN: r228971
2015-10-19 14:00:28 +00:00
Richard Biener 4534c2032b gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function.
2015-10-19  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function.
	(gimple_stmt_nonnegative_warnv_p): Use it.
	* match.pd (CPROJ): New operator list.
	(cproj (complex ...)): Move simplifications from ...
	* builtins.c (fold_builtin_cproj): ... here.

	* gcc.dg/torture/builtin-cproj-1.c: Skip for -O0.

From-SVN: r228970
2015-10-19 13:58:27 +00:00
H.J. Lu 1c6e3c3e2c Use GET_MODE_BITSIZE to get vector natural alignment
Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment
is 4 byte for IA MCU psABI, we should use GET_MODE_BITSIZE for IA MCU
psABI to get vector natural alignment to check misaligned vector move.

	* config/i386/i386.c (ix86_expand_vector_move): Use
	GET_MODE_BITSIZE for IA MCU psABI to get vector natural
	alignment.

From-SVN: r228969
2015-10-19 04:41:03 -07:00
H.J. Lu 1be8ebde2e Replace @optindex with @opindex
* doc/invoke.texi: Replace @optindex with @opindex.

From-SVN: r228968
2015-10-19 04:30:46 -07:00
H.J. Lu 3f11bf19d9 Don't leak ISA to __attribute__ ((target("arch=XXX")))
When processing __attribute__ ((target("arch=XXX"))), we should clear
the ISA bits in x_ix86_isa_flags first to avoid leaking ISA from
command line.

gcc/

	PR target/67995
	* config/i386/i386.c (ix86_valid_target_attribute_tree): If
	arch= is set,  clear all bits in x_ix86_isa_flags, except for
	ISA_64BIT, ABI_64, ABI_X32, and CODE16.

gcc/testsuite/

	PR target/67995
	* gcc.target/i386/pr67995-1.c: New test.
	* gcc.target/i386/pr67995-2.c: Likewise.
	* gcc.target/i386/pr67995-3.c: Likewise.

From-SVN: r228967
2015-10-19 04:18:14 -07:00
Joost VandeVondele 7be37b351a fix date of changelog entry
From-SVN: r228966
2015-10-19 10:26:32 +00:00
Joost VandeVondele 787da5fdbf Fix PR68002, add -fkeep-static-functions
gcc/ChangeLog:

2015-10-17  Joost VandeVondele  <vondele@gnu.gcc.org>

        PR middle-end/68002
        * common.opt (fkeep-static-functions): New option.
        * doc/invoke.texi: Document it.
        * cgraphunit.c (cgraph_node::finalize_function): Use it.

gcc/testsuite/ChangeLog:

2015-10-17  Joost VandeVondele  <vondele@gnu.gcc.org>

        PR middle-end/68002
        * gcc.dg/PR68002.c: New test.

From-SVN: r228965
2015-10-19 10:24:37 +00:00
Richard Sandiford 9c99fe750c Remove undefined behaviour from builtins-20.c
builtins-20.c had:

      if (cos((y*=2, -fabs(tan(x/-y)))) != cos((y*=2,tan(x/y))))
        link_error ();

which is undefined behaviour.  The test expected that y had the same
value in x/y and x/-y, but gimplification actually implements the
"obvious" interpretation, multiplying y by 2, using it for one cos call,
then multiplying it by 2 again and using it for the other cos call.

The file has other (valid) tests that side-effects don't block
optimisation, such as:

      if (cosf((y*=3, -x)) != cosf((y*=3,x)))
        link_error ();

so this patch simply removes this instance.

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

gcc/testsuite/
	* gcc.dg/builtins-20.c: Remove undefined behavior.

From-SVN: r228963
2015-10-19 10:06:56 +00:00